diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-08-26 11:25:19 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-08-26 11:25:19 +0000 |
commit | 5e992aa7edd42ee7011e6fce98b723c9ff983be3 (patch) | |
tree | a49c93c5fa74fda15f993f0b580123ecd5a81023 /cpp/src/IcePatch2/Util.cpp | |
parent | Added support for 'executable' flag. (diff) | |
download | ice-5e992aa7edd42ee7011e6fce98b723c9ff983be3.tar.bz2 ice-5e992aa7edd42ee7011e6fce98b723c9ff983be3.tar.xz ice-5e992aa7edd42ee7011e6fce98b723c9ff983be3.zip |
*** empty log message ***
Diffstat (limited to 'cpp/src/IcePatch2/Util.cpp')
-rw-r--r-- | cpp/src/IcePatch2/Util.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp index 71af38368ae..a4f6ef87998 100644 --- a/cpp/src/IcePatch2/Util.cpp +++ b/cpp/src/IcePatch2/Util.cpp @@ -717,6 +717,7 @@ IcePatch2::decompressFile(const string& pa) void IcePatch2::setFileFlags(const string& pa, const FileInfo& info) { +#ifndef _WIN32 // Windows doesn't support the executable flag const string path = simplify(pa); struct stat buf; if(stat(path.c_str(), &buf) == -1) @@ -724,6 +725,7 @@ IcePatch2::setFileFlags(const string& pa, const FileInfo& info) throw "cannot stat `" + path + "':\n" + lastError(); } chmod(path.c_str(), info.executable ? buf.st_mode | S_IXUSR : buf.st_mode & ~S_IXUSR); +#endif } static bool @@ -826,7 +828,11 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G FileInfo info; info.path = relPath; info.size = 0; +#ifdef _WIN32 + info.executable = false; // Windows doesn't support the executable flag +#else info.executable = buf.st_mode & S_IXUSR; +#endif ByteSeq bytes(relPath.size() + buf.st_size); copy(relPath.begin(), relPath.end(), bytes.begin()); |