summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-02-21 09:58:56 +1000
committerDan McGee <dan@archlinux.org>2012-02-20 18:03:19 -0600
commit687f7b6ba833db836d8d8387c5b728238b0eac5d (patch)
tree90ecaa45c559fc52478ea75defe8ed6b08ed888b /lib/libalpm
parent3849c3aec130601572b9e06b42bb6af5938936de (diff)
downloadpacman-687f7b6ba833db836d8d8387c5b728238b0eac5d.tar.xz
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>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/util.c4
1 files changed, 2 insertions, 2 deletions
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;
}