diff options
author | Brad King <brad.king@kitware.com> | 2013-11-01 20:52:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-01 20:52:22 (GMT) |
commit | 4c383b52d0611c56679f96cbc99fc1d6683b5ca9 (patch) | |
tree | 755da84855c525f02074073b933d77811af5026d /Source/cmSystemTools.cxx | |
parent | 0d8552c4597793262f4201dee98c73907c31d5bc (diff) | |
download | CMake-4c383b52d0611c56679f96cbc99fc1d6683b5ca9.zip CMake-4c383b52d0611c56679f96cbc99fc1d6683b5ca9.tar.gz CMake-4c383b52d0611c56679f96cbc99fc1d6683b5ca9.tar.bz2 |
cmake: Avoid '-E tar' failure to extract symlinks on Windows (#13251)
If a symlink fails to extract and the host system is Windows then report
a warning and skip the entry instead of failing. This will allow
archives containing symbolic links to be extracted on Windows with
somewhat gracefully degraded behavior.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 34a1216..1ecda88 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1660,6 +1660,14 @@ bool extract_tar(const char* outFileName, bool verbose, break; } } +#ifdef _WIN32 + else if(const char* linktext = archive_entry_symlink(entry)) + { + std::cerr << "cmake -E tar: warning: skipping symbolic link \"" + << archive_entry_pathname(entry) << "\" -> \"" + << linktext << "\"." << std::endl; + } +#endif else { cmSystemTools::Error("Problem with archive_write_header(): ", |