diff options
-rw-r--r-- | lib/common/Utils.cpp | 6 | ||||
-rw-r--r-- | lib/common/Utils.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/common/Utils.cpp b/lib/common/Utils.cpp index 5dc03124..de392ef4 100644 --- a/lib/common/Utils.cpp +++ b/lib/common/Utils.cpp @@ -135,15 +135,15 @@ bool FileExists(const char *Filename, int64_t *pFileSize, bool TreatLinksAsNotEx // -------------------------------------------------------------------------- // // Function -// Name: ObjectExists(const char *) +// Name: ObjectExists(const std::string& rFilename) // Purpose: Does a object exist, and if so, is it a file or a directory? // Created: 23/11/03 // // -------------------------------------------------------------------------- -int ObjectExists(const char *Filename) +int ObjectExists(const std::string& rFilename) { struct stat st; - if(::stat(Filename, &st) != 0) + if(::stat(rFilename.c_str(), &st) != 0) { if(errno == ENOENT) { diff --git a/lib/common/Utils.h b/lib/common/Utils.h index 5da84d9a..d0842b51 100644 --- a/lib/common/Utils.h +++ b/lib/common/Utils.h @@ -29,7 +29,7 @@ enum ObjectExists_File = 1, ObjectExists_Dir = 2 }; -int ObjectExists(const char *Filename); +int ObjectExists(const std::string& rFilename); #include "MemLeakFindOff.h" |