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

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sun Nov 4 14:45:05 GMT 2007


Author: chris
Date: 2007-11-04 14:45:05 +0000 (Sun, 04 Nov 2007)
New Revision: 1915

Modified:
   box/trunk/lib/common/NamedLock.cpp
Log:
Log an error if we fail to open the lockfile.


Modified: box/trunk/lib/common/NamedLock.cpp
===================================================================
--- box/trunk/lib/common/NamedLock.cpp	2007-11-04 05:23:40 UTC (rev 1914)
+++ box/trunk/lib/common/NamedLock.cpp	2007-11-04 14:45:05 UTC (rev 1915)
@@ -59,7 +59,7 @@
 // Function
 //		Name:    NamedLock::TryAndGetLock(const char *, int)
 //		Purpose: Trys to get a lock on the name in the file system.
-//				 IMPORTANT NOTE: If a file exists with this name, it will be deleted.
+//			 IMPORTANT NOTE: If a file exists with this name, it will be deleted.
 //		Created: 2003/08/28
 //
 // --------------------------------------------------------------------------
@@ -93,6 +93,7 @@
 	int fd = ::open(Filename, O_WRONLY | O_CREAT | O_TRUNC, mode);
 	if(fd == -1)
 	{
+		BOX_WARNING("Failed to open lockfile: " << Filename);
 		THROW_EXCEPTION(CommonException, OSFileError)
 	}
 




More information about the Boxbackup-commit mailing list