Title: [249027] trunk/Source/WTF
Revision
249027
Author
[email protected]
Date
2019-08-22 14:28:29 -0700 (Thu, 22 Aug 2019)

Log Message

Logging in FileSystem::deleteFile should avoid logging unsurprising errors
https://bugs.webkit.org/show_bug.cgi?id=200831

Patch by Kate Cheney <[email protected]> on 2019-08-22
Reviewed by Chris Dumez.

To avoid overlogging unnecessary information, added a check to avoid logging
ENOENT (file not found) errors.

* wtf/posix/FileSystemPOSIX.cpp:
(WTF::FileSystemImpl::deleteFile):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (249026 => 249027)


--- trunk/Source/WTF/ChangeLog	2019-08-22 21:13:38 UTC (rev 249026)
+++ trunk/Source/WTF/ChangeLog	2019-08-22 21:28:29 UTC (rev 249027)
@@ -1,3 +1,16 @@
+2019-08-22  Kate Cheney  <[email protected]>
+
+        Logging in FileSystem::deleteFile should avoid logging unsurprising errors
+        https://bugs.webkit.org/show_bug.cgi?id=200831
+
+        Reviewed by Chris Dumez.
+
+        To avoid overlogging unnecessary information, added a check to avoid logging
+        ENOENT (file not found) errors.
+
+        * wtf/posix/FileSystemPOSIX.cpp:
+        (WTF::FileSystemImpl::deleteFile):
+
 2019-08-22  Alex Christensen  <[email protected]>
 
         Disable legacy TLS versions and add a temporary default to re-enable it

Modified: trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp (249026 => 249027)


--- trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp	2019-08-22 21:13:38 UTC (rev 249026)
+++ trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp	2019-08-22 21:28:29 UTC (rev 249027)
@@ -73,7 +73,7 @@
 
     // unlink(...) returns 0 on successful deletion of the path and non-zero in any other case (including invalid permissions or non-existent file)
     bool unlinked = !unlink(fsRep.data());
-    if (!unlinked)
+    if (!unlinked && errno != ENOENT)
         LOG_ERROR("File failed to delete. Error message: %s", strerror(errno));
 
     return unlinked;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to