Skip to content

cmGeneratedFileStream: Do not remove empty path

Brad King requested to merge brad.king/cmake:avoid-remove-empty-path into master

If Close() is called when a file was never opened, we have no temporary file path. Do not try to remove it. Some implementations of unlink() crash on an empty path (though the documented behavior is to fail with ENOENT).

Fixes: #23414 (closed)
Backport: release

Merge request reports