https://bugs.documentfoundation.org/show_bug.cgi?id=166518

            Bug ID: 166518
           Summary: Enhance sync- and automation-friendliness of file
                    handling
           Product: LibreOffice
           Version: 25.2.3.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Currently, when a file is opened by LibreOffice, LibreOffice retains an open
file handle at all times. Additionally, LibreOffice does not detect, if the
file has been changed outside of LibreOffice while it is opened.

This limits the ability to modify files with external tools safely, most
notably including synchronization of local files with services like Dropbox. 

Steps to Reproduce:
1. Open a document.
2. Try to modify it externally.

Actual Results:
1. On Windows, modification will fail due to the retained file handle, which on
Windows also locks the file name. 
2. On Linux, the file will me modified, but LibreOffice will ignore it,
allowing to accidentally discard the external modifications by saving the file
from LibreOffice.

Expected Results:
1. On Windows, having the file open should not block it from being modified. 
2. On any OS, LibreOffice should detect when the underlying file has been
modified and offer reloading the file from the disk.
3. If there were edits in LibreOffice since last saving, the conflict between
disk version and in-memory version of the file should be warned about.


Reproducible: Always


User Profile Reset: No

Additional Info:
Behavior as described is common in programming text editors. The only document
editor I am aware of with a similar feature is LyX.

Most of the desired behavior could be achieved by 
1. Releasing the file handle when the document is saved.
2. When making the first edit after saving, check if the file modification date
is as expected.
3. If not, warn the user that the file has changed on disk, and offer to reload
it.

Note that I do not know internal about how LibreOffice uses the file handle.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to