[Box Backup-commit] COMMIT r2532 - box/trunk/lib/common

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Sat Jun 27 12:35:02 BST 2009


Author: chris
Date: 2009-06-27 12:35:02 +0100 (Sat, 27 Jun 2009)
New Revision: 2532

Modified:
   box/trunk/lib/common/Utils.cpp
Log:
Make FileExists take a std::string instead of a const char * for C++ 
style.


Modified: box/trunk/lib/common/Utils.cpp
===================================================================
--- box/trunk/lib/common/Utils.cpp	2009-06-27 11:34:41 UTC (rev 2531)
+++ box/trunk/lib/common/Utils.cpp	2009-06-27 11:35:02 UTC (rev 2532)
@@ -156,15 +156,16 @@
 // --------------------------------------------------------------------------
 //
 // Function
-//		Name:    FileExists(const char *)
+//		Name:    FileExists(const std::string& rFilename)
 //		Purpose: Does a file exist?
 //		Created: 20/11/03
 //
 // --------------------------------------------------------------------------
-bool FileExists(const char *Filename, int64_t *pFileSize, bool TreatLinksAsNotExisting)
+bool FileExists(const std::string& rFilename, int64_t *pFileSize,
+	bool TreatLinksAsNotExisting)
 {
 	EMU_STRUCT_STAT st;
-	if(EMU_LSTAT(Filename, &st) != 0)
+	if(EMU_LSTAT(rFilename.c_str(), &st) != 0)
 	{
 		if(errno == ENOENT)
 		{




More information about the Boxbackup-commit mailing list