summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/files.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/files.cpp b/src/utils/files.cpp
index 15b667ba8..2d7994f8a 100644
--- a/src/utils/files.cpp
+++ b/src/utils/files.cpp
@@ -151,7 +151,8 @@ int Files::renameFile(const std::string &srcName, const std::string &dstName)
delete [] buf;
fclose(srcFile);
fclose(dstFile);
- ::remove(srcName.c_str());
+ if (!::remove(srcName.c_str()))
+ return 0;
- return 0;
+ return -1;
}