diff options
author | Brad King <brad.king@kitware.com> | 2016-05-02 14:48:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-02 14:48:48 (GMT) |
commit | e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b (patch) | |
tree | 7e84ef0666764bcad5e77c9955c7dcd13413b427 /Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c | |
parent | db9c40b4f5c9e1aadfe11c89040bad1e3b386162 (diff) | |
parent | 501345e470bb9c5b0cb61aff84bd50ffdd95b92d (diff) | |
download | CMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.zip CMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.tar.gz CMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.tar.bz2 |
Merge branch 'upstream-LibArchive' into update-libarchive
Resolve conflicts in C code by taking their side. Resolve conflicts in
CMake code by integrating the changes.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c b/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c index 450ac75..5946683 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_disk_posix.c @@ -2386,6 +2386,9 @@ check_symlinks(struct archive_write_disk *a) while ((*pn != '\0') && (*p == *pn)) ++p, ++pn; } + /* Skip the root directory if the path is absolute. */ + if(pn == a->name && pn[0] == '/') + ++pn; c = pn[0]; /* Keep going until we've checked the entire name. */ while (pn[0] != '\0' && (pn[0] != '/' || pn[1] != '\0')) { @@ -2447,6 +2450,9 @@ check_symlinks(struct archive_write_disk *a) return (ARCHIVE_FAILED); } } + pn[0] = c; + if (pn[0] != '\0') + pn++; /* Advance to the next segment. */ } pn[0] = c; /* We've checked and/or cleaned the whole path, so remember it. */ |