summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2Lib/Util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePatch2Lib/Util.cpp')
-rw-r--r--cpp/src/IcePatch2Lib/Util.cpp10
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)
{