Summary: | Error out on save if the file we had opened has been modified since we opened it | ||
---|---|---|---|
Product: | poppler | Reporter: | Albert Astals Cid <aacid> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | nate, Thomas.Freitag |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Error out on save if file has changed since we opened it
win version for Error out on save if file has changed since we opened it |
Description
Albert Astals Cid
2017-11-17 13:45:48 UTC
(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. ok, then someone will have to provide the windows codepath i guess. Created attachment 135735 [details] [review] win version for Error out on save if file has changed since we opened it Here the windows codepath. Cool, i'll push this in a week if noone disagrees :) Pushed |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.