CPack/Archive: Show filename causing same-file-different-content

When there are two files with the same name but different content, an
error is shown, but the error does not include the filename which caused
it. This adds the filename to the error.
This commit is contained in:
Rex Keen
2026-03-03 15:53:00 -05:00
committed by Brad King
parent 07e9e86569
commit c6cefac938
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -361,7 +361,8 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
} else if (status == DeduplicateStatus::Error) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"ERROR The data in files with the "
"same filename is different.");
"same filename is different: "
<< rp << std::endl);
return 0;
} else {
cmCPackLogger(cmCPackLog::LOG_DEBUG,
@@ -1 +1 @@
CPack Error: ERROR The data in files with the same filename is different.*
CPack Error: ERROR The data in files with the same filename is different: files/1\.txt
@@ -1 +1 @@
CPack Error: ERROR The data in files with the same filename is different.*
CPack Error: ERROR The data in files with the same filename is different: files/symlink2