diff options
author | Brad King <brad.king@kitware.com> | 2023-11-29 12:54:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-29 12:54:36 (GMT) |
commit | 165bf3252f00e3485a00b872411a26ecbb324801 (patch) | |
tree | 727903b5b6e16596d88f35cc44ad98902e382da0 /Source/kwsys | |
parent | 245e111269c4cdb903629e84e9ee148f6e0573f6 (diff) | |
parent | 22a759b5b548036e980992aeead9c49cfe40bafb (diff) | |
download | CMake-165bf3252f00e3485a00b872411a26ecbb324801.zip CMake-165bf3252f00e3485a00b872411a26ecbb324801.tar.gz CMake-165bf3252f00e3485a00b872411a26ecbb324801.tar.bz2 |
Merge branch 'upstream-KWSys' into remove-write-only-dir
# By KWSys Upstream
* upstream-KWSys:
KWSys 2023-11-29 (433f3d23)
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index cefb922..53b55f6 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -2794,14 +2794,14 @@ Status SystemTools::RemoveFile(std::string const& source) Status SystemTools::RemoveADirectory(std::string const& source) { - // Add write permission to the directory so we can modify its - // content to remove files and directories from it. + // Add read and write permission to the directory so we can read + // and modify its content to remove files and directories from it. mode_t mode = 0; if (SystemTools::GetPermissions(source, mode)) { #if defined(_WIN32) && !defined(__CYGWIN__) - mode |= S_IWRITE; + mode |= S_IREAD | S_IWRITE; #else - mode |= S_IWUSR; + mode |= S_IRUSR | S_IWUSR; #endif SystemTools::SetPermissions(source, mode); } |