[Webkit-unassigned] [Bug 216392] New: WebKitDownload deleting/damaging files it shouldn't touch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 10 18:08:08 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=216392

            Bug ID: 216392
           Summary: WebKitDownload deleting/damaging files it shouldn't
                    touch.
           Product: WebKit
           Version: WebKit Local Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: crl at mailinator.com
                CC: bugs-noreply at webkitgtk.org

Saving a WebKitDownload to /path/to/filename, which already exists.

/path/to/hardlink is a hard link to /path/to/filename.

(1)
webkit_download_set_destination(wkdl,"file:///path/to/filename");
webkit_download_set_allow_overwrite(wkdl,FALSE);

Bug: The operation fails (as expected), but the existing /path/to/filename is deleted.
 Even if /path/to/filename is write-protected.
 Even if /path/to/filename is actually an empty directory.

(2)
webkit_download_set_destination(wkdl,"file:///path/to/filename");
webkit_download_set_allow_overwrite(wkdl,TRUE);

With everything writeable, the download is saved with a new inode, breaking the hard link. Won't argue the "new inode" -- opinions may differ.  But I would expect the contents of /path/to/hardlink to be untouched.

Bug: The contents of /path/to/hardlink are deleted, leaving an empty file.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200911/c74f25e2/attachment-0001.htm>


More information about the webkit-unassigned mailing list