diff options
author | Jose <jose@zeroc.com> | 2009-11-10 05:30:26 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-11-10 05:30:26 +0100 |
commit | 4247c9e2c2612394a5f4d63a65ba538f975906d4 (patch) | |
tree | 96d3308681d9b0684ce5dd763f5a5d415eaf09d7 /cpp/src/IcePatch2Lib/Util.cpp | |
parent | Win32 64 bits compilation error (diff) | |
download | ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.tar.bz2 ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.tar.xz ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.zip |
Fixed 3962 - Berkeley DB, problems with unicode paths.
Diffstat (limited to 'cpp/src/IcePatch2Lib/Util.cpp')
-rw-r--r-- | cpp/src/IcePatch2Lib/Util.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index 41d422e8556..ca2510a119c 100644 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -280,7 +280,7 @@ IcePatch2::simplify(const string& path) } if(result == "/." || - (result.size() == 4 && isalpha(static_cast<unsigned char>(result[0])) && result[1] == ':' && + (result.size() == 4 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && result[2] == '/' && result[3] == '.')) { return result.substr(0, result.size() - 1); @@ -291,8 +291,8 @@ IcePatch2::simplify(const string& path) result.erase(result.size() - 2, 2); } - if(result == "/" || (result.size() == 3 && isalpha(static_cast<unsigned char>(result[0])) && result[1] == ':' && - result[2] == '/')) + if(result == "/" || (result.size() == 3 && IceUtilInternal::isAlpha(result[0]) && result[1] == ':' && + result[2] == '/')) { return result; } @@ -315,7 +315,7 @@ IcePatch2::isRoot(const string& pa) { string path = simplify(pa); #ifdef _WIN32 - return path == "/" || path.size() == 3 && isalpha(static_cast<unsigned char>(path[0])) && path[1] == ':' && + return path == "/" || path.size() == 3 && IceUtilInternal::isAlpha(path[0]) && path[1] == ':' && path[2] == '/'; #else return path == "/"; @@ -404,7 +404,6 @@ IcePatch2::rename(const string& fromPa, const string& toPa) const string toPath = simplify(toPa); IceUtilInternal::remove(toPath); // We ignore errors, as the file we are renaming to might not exist. - if(IceUtilInternal::rename(fromPath ,toPath) == -1) { throw "cannot rename `" + fromPath + "' to `" + toPath + "': " + IceUtilInternal::lastErrorToString(); @@ -1055,6 +1054,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G close(fd); const string pathBZ2Temp = path + ".bz2temp"; + FILE* stdioFile = IceUtilInternal::fopen(pathBZ2Temp, "wb"); if(fwrite(&compressedBytes[0], compressedLen, 1, stdioFile) != 1) { |