diff options
author | Brad King <brad.king@kitware.com> | 2022-05-03 15:24:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-05-03 15:25:08 (GMT) |
commit | 28957f7f2502830edc7753a5a7e1db7cc0b16ab4 (patch) | |
tree | dd4b38a243d842ae9a5cd7c5023ed34ab2a1a981 /Source | |
parent | 4a215d292f49200fd2ed5791239174fd7f6c26fe (diff) | |
parent | 71ded12a756e78bdfe07f54dd84dbfebc7556f09 (diff) | |
download | CMake-28957f7f2502830edc7753a5a7e1db7cc0b16ab4.zip CMake-28957f7f2502830edc7753a5a7e1db7cc0b16ab4.tar.gz CMake-28957f7f2502830edc7753a5a7e1db7cc0b16ab4.tar.bz2 |
Merge topic 'avoid-remove-empty-path' into release-3.23
71ded12a75 cmGeneratedFileStream: Do not remove empty path
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7223
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratedFileStream.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index c86001a..a52e66a 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -180,7 +180,9 @@ bool cmGeneratedFileStreamBase::Close() // Else, the destination was not replaced. // // Always delete the temporary file. We never want it to stay around. - cmSystemTools::RemoveFile(this->TempName); + if (!this->TempName.empty()) { + cmSystemTools::RemoveFile(this->TempName); + } return replaced; } |