From 687f7b6ba833db836d8d8387c5b728238b0eac5d Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 21 Feb 2012 09:58:56 +1000 Subject: 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 Signed-off-by: Dan McGee --- lib/libalpm/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 34f817e1..c3212292 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -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; } -- cgit v1.2.3-70-g09d2