diff options
author | Brad King <brad.king@kitware.com> | 2015-01-19 19:14:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-19 19:15:58 (GMT) |
commit | 90f9c42732a18e53943c3aa27de76c2511c5a0c6 (patch) | |
tree | a5f100a00f3377873a3bcab7654312618c49b103 | |
parent | 2e71d92ef270c4234368fd2e88259c0defbfb650 (diff) | |
download | CMake-90f9c42732a18e53943c3aa27de76c2511c5a0c6.zip CMake-90f9c42732a18e53943c3aa27de76c2511c5a0c6.tar.gz CMake-90f9c42732a18e53943c3aa27de76c2511c5a0c6.tar.bz2 |
cmake: Teach "-E tar" to report file name on failure to read from disk
The libarchive-provided error message does not always include the file
name, so add it to the message ourselves to ensure users know which file
fails.
-rw-r--r-- | Source/cmArchiveWrite.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index a2aecac..16f67f4 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -271,7 +271,9 @@ bool cmArchiveWrite::AddFile(const char* file, cm_archive_entry_copy_pathname(e, dest); if(archive_read_disk_entry_from_file(this->Disk, e, -1, 0) != ARCHIVE_OK) { - this->Error = "archive_read_disk_entry_from_file: "; + this->Error = "archive_read_disk_entry_from_file '"; + this->Error += file; + this->Error += "': "; this->Error += cm_archive_error_string(this->Disk); return false; } |