diff options
author | Brad King <brad.king@kitware.com> | 2019-05-21 13:20:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-21 13:25:32 (GMT) |
commit | a1eb03569d0e82fb6eaf9a11da1960cfa456f5ef (patch) | |
tree | 25283c5ad6e24dcbdf80eb8bad912ca6892f21f9 /Help/release | |
parent | 1db0edb2a65b272a7c91e719e818da2e2ce49fb5 (diff) | |
download | CMake-a1eb03569d0e82fb6eaf9a11da1960cfa456f5ef.zip CMake-a1eb03569d0e82fb6eaf9a11da1960cfa456f5ef.tar.gz CMake-a1eb03569d0e82fb6eaf9a11da1960cfa456f5ef.tar.bz2 |
file: Change REMOVE to ignore empty names
Previously code like
file(REMOVE_RECURSE "${accidentally_missing_variable}")
treated the empty string as a relative path with respect to the
current directory and removed its contents. Change this behavior
to ignore the empty string with a warning instead.
Normally such behavior changes are done with a policy, but in this case
such code is likely a real bug in project code that can delete data.
Fixes: #19274
Diffstat (limited to 'Help/release')
-rw-r--r-- | Help/release/dev/file-remove-no-empty.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Help/release/dev/file-remove-no-empty.rst b/Help/release/dev/file-remove-no-empty.rst new file mode 100644 index 0000000..0a68d67 --- /dev/null +++ b/Help/release/dev/file-remove-no-empty.rst @@ -0,0 +1,6 @@ +file-remove-no-empty +-------------------- + +* The :command:`file(REMOVE)` and :command:`file(REMOVE_RECURSE)` commands + were changed to ignore empty arguments with a warning instead of treating + them as a relative path and removing the contents of the current directory. |