--- a/src/os/linux/file.cpp
+++ b/src/os/linux/file.cpp
@@ -288,7 +288,7 @@
                     lockStr.length() * sizeof(TCHAR));
     ASSERT(numWrit > 0);
     close(fh);
-    retval = true;
+    retval = (numWrit > 0);
   }
 #ifdef UNICODE
   delete[] lfn;