diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-11-04 16:33:53 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-11-04 16:33:53 +0000 |
commit | f24aa2064954b1c529621c8e6425d26c0c78b1bb (patch) | |
tree | 930fbc3c44afa10223546eb26e8f75c6c951fc32 /lib/common/Utils.cpp | |
parent | a7c1c05da41829419060ea3e60c0fa4f95dc4e67 (diff) |
Allow ObjectExists() to take a std::string instead of just char *.
Diffstat (limited to 'lib/common/Utils.cpp')
-rw-r--r-- | lib/common/Utils.cpp | 6 |
1 files changed, 3 insertions, 3 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) { |