index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2007-10-29 23:12:37 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-10-29 23:12:37 -0500 |
commit | be387148c95ee5ed4e45dc841cd12fee010b998a (patch) | |
tree | c8d2c3e2ed04d051a646e35e5c56325c2d73688d /lib/libalpm/handle.c | |
parent | 6af7dbcf72b0e95f7c36b17fac88fd2658c2a8e4 (diff) |
-rw-r--r-- | lib/libalpm/handle.c | 7 |
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 5cbb0157..4c18943a 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -285,10 +285,9 @@ int SYMEXPORT alpm_option_set_root(const char *root) pm_errno = PM_ERR_NOT_A_DIR; return(-1); } - /* According to the man page, realpath is safe to use IFF the second arg is - * NULL. */ - realroot = realpath(root, NULL); - if(!realroot) { + + realroot = calloc(PATH_MAX+1, sizeof(char)); + if(!realpath(root, realroot)) { pm_errno = PM_ERR_NOT_A_DIR; return(-1); } |