Use "mode" in _alpm_makepath_mode
It seems that if we pass the permissions that we want the created directory to have, then we should probably use it... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
3849c3aec1
commit
687f7b6ba8
|
@ -118,7 +118,7 @@ int _alpm_makepath_mode(const char *path, mode_t mode)
|
|||
/* temporarily mask the end of the path */
|
||||
*ptr = '\0';
|
||||
|
||||
if(mkdir(str, 0755) < 0 && errno != EEXIST) {
|
||||
if(mkdir(str, mode) < 0 && errno != EEXIST) {
|
||||
ret = 1;
|
||||
goto done;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ int _alpm_makepath_mode(const char *path, mode_t mode)
|
|||
|
||||
/* end of the string. add the full path. It will already exist when the path
|
||||
* passed in has a trailing slash. */
|
||||
if(mkdir(str, 0755) < 0 && errno != EEXIST) {
|
||||
if(mkdir(str, mode) < 0 && errno != EEXIST) {
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue