[Poppler-bugs] [Bug 103793] New: Error out on save if the file we had opened has been modified since we opened it

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Nov 17 13:45:48 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103793

            Bug ID: 103793
           Summary: Error out on save if the file we had opened has been
                    modified since we opened it
           Product: poppler
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: poppler-bugs at lists.freedesktop.org
          Reporter: aacid at kde.org

Created attachment 135556
  --> https://bugs.freedesktop.org/attachment.cgi?id=135556&action=edit
Error out on save if file has changed since we opened it

In poppler we keep the fd of the file open so the XRef+FileStream can locate
objects. This is good since we save lots of memory for not having everything on
memory all the time, but that means that when we want to save we need the file
to be exactly the same as it was when we created the XRef otherwise we're going
to be reading from the wrong part of the "new" file.

The attached patch checks the modification time of the fd and errors out if it
has changed since we opened the file.

It's a stub in windows since my understanding there is that you can't edit a
file that is open by another program.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20171117/9c0049a0/attachment.html>


More information about the Poppler-bugs mailing list