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

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Fri May 22 21:01:52 BST 2009


Author: chris
Date: 2009-05-22 21:01:51 +0100 (Fri, 22 May 2009)
New Revision: 2527

Modified:
   box/trunk/lib/common/FileStream.cpp
Log:
Log the file name that could not be opened, even for access denied errors.


Modified: box/trunk/lib/common/FileStream.cpp
===================================================================
--- box/trunk/lib/common/FileStream.cpp	2009-05-22 08:38:45 UTC (rev 2526)
+++ box/trunk/lib/common/FileStream.cpp	2009-05-22 20:01:51 UTC (rev 2527)
@@ -67,19 +67,20 @@
 	{
 		MEMLEAKFINDER_NOT_A_LEAK(this);
 
+		#ifdef WIN32
+		BOX_LOG_WIN_WARNING_NUMBER("Failed to open file: " <<
+			mFileName, winerrno);
+		#else
+		BOX_LOG_SYS_WARNING("Failed to open file: " <<
+			mFileName);
+		#endif
+
 		if(errno == EACCES)
 		{
 			THROW_EXCEPTION(CommonException, AccessDenied)
 		}
 		else
 		{
-			#ifdef WIN32
-			BOX_LOG_WIN_WARNING_NUMBER("Failed to open file: " <<
-				mFileName, winerrno);
-			#else
-			BOX_LOG_SYS_WARNING("Failed to open file: " <<
-				mFileName);
-			#endif
 			THROW_EXCEPTION(CommonException, OSFileOpenError)
 		}
 	}




More information about the Boxbackup-commit mailing list