- added purge file stats and bugfix when showing help on commandline

This commit is contained in:
Mark Vejvoda
2011-03-15 16:52:42 +00:00
parent 7d38aec84a
commit 2c6fef4efc
3 changed files with 43 additions and 17 deletions

View File

@@ -1433,10 +1433,12 @@ bool renameFile(string oldFile, string newFile) {
return (result == 0);
}
long getFileSize(string filename) {
off_t getFileSize(string filename) {
struct stat stbuf;
stat(filename.c_str(), &stbuf);
return stbuf.st_size;
if(stat(filename.c_str(), &stbuf) != -1) {
return stbuf.st_size;
}
return 0;
}
// =====================================