index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2012-04-29 18:26:13 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-06-25 23:00:12 -0500 |
commit | 9ce4f80db4cccfe16c4a747b8bf3185b48e8aefc (patch) | |
tree | 71b2cc26e8b0e9486ad05b4745117a2a47aeeb89 /lib | |
parent | ac990b96e7d305e0f20f00601f2172879faac9a1 (diff) |
-rw-r--r-- | lib/libalpm/diskspace.c | 8 |
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index daee2447..1fc297ed 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -325,9 +325,17 @@ int _alpm_check_downloadspace(alpm_handle_t *handle, const char *cachedir, { alpm_list_t *mount_points; alpm_mountpoint_t *cachedir_mp; + char resolved_cachedir[PATH_MAX]; size_t j; int error = 0; + /* resolve the cachedir path to ensure we check the right mountpoint. We + * handle failures silently, and continue to use the possibly unresolved + * path. */ + if(realpath(cachedir, resolved_cachedir) != NULL) { + cachedir = resolved_cachedir; + } + mount_points = mount_point_list(handle); if(mount_points == NULL) { _alpm_log(handle, ALPM_LOG_ERROR, _("could not determine filesystem mount points\n")); |