Changeset 249027 in webkit


Ignore:
Timestamp:
Aug 22, 2019 2:28:29 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Kate Cheney <Kate Cheney> 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):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r249019 r249027  
     12019-08-22  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        Logging in FileSystem::deleteFile should avoid logging unsurprising errors
     4        https://bugs.webkit.org/show_bug.cgi?id=200831
     5
     6        Reviewed by Chris Dumez.
     7
     8        To avoid overlogging unnecessary information, added a check to avoid logging
     9        ENOENT (file not found) errors.
     10
     11        * wtf/posix/FileSystemPOSIX.cpp:
     12        (WTF::FileSystemImpl::deleteFile):
     13
    1142019-08-22  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp

    r248822 r249027  
    7474    // unlink(...) returns 0 on successful deletion of the path and non-zero in any other case (including invalid permissions or non-existent file)
    7575    bool unlinked = !unlink(fsRep.data());
    76     if (!unlinked)
     76    if (!unlinked && errno != ENOENT)
    7777        LOG_ERROR("File failed to delete. Error message: %s", strerror(errno));
    7878
Note: See TracChangeset for help on using the changeset viewer.