[Poppler-bugs] [Bug 103793] 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
Mon Nov 20 14:58:52 UTC 2017


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

--- Comment #1 from Thomas Freitag <Thomas.Freitag at alfa.de> ---
(In reply to Albert Astals Cid from comment #0)
> 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 not true, Albert. The files, at least with poppler, are opened with
sharing enabled, i.e.

  HANDLE handle = CreateFileA(fileName->getCString(),
                              GENERIC_READ,
-->                           FILE_SHARE_READ | FILE_SHARE_WRITE,
                              NULL,
                              OPEN_EXISTING,
                              FILE_ATTRIBUTE_NORMAL, NULL);

That means that other processes are allowed to read and even write to the same
file!
But we can probably do the same under windows with GetFileTime, using the
lpLastWriteTime parameter.

-- 
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/20171120/f2bf20b9/attachment.html>


More information about the Poppler-bugs mailing list