2

Opening a file with filename foo with LibreOffice creates, at least on my system (Debian Jessie, Openbox, no Desktop Environment, Thunar) a file named .~lock.foo#, apparently as a means of flagging that it has the file open. When LibreOffice is closed, the new file is deleted. So far, so good.

But this file creation and deletion results in the Date Modified attribute of the enclosing folder being updated to the present, even if the no actual changes have been made to any of its contents.

So here's the question: How can I either get LibreOffice not to create a lock file in the same directory as the file being edited, or suppress the updating of the folder's Date Modified attribute under those conditions.

  • This might help – Fox Mar 13 '17 at 2:09
1

You would probably not be able to suppress updating the timestamp on the directory without making the directory read-only. A directory's last-modified timestamp will be updated whenever a directory entry (directory or file) is created or deleted within the directory.

The lock file should only be created if you actually edit the file. You can open a file as a read-only file by using LibreOffice with its --view command line option. This should prevent LibreOffice from creating a lock file for the document.

You may unfortunately not change the directory where LibreOffice creates the lock files.

You may disable file locking completely (which IMHO sounds like a bad idea) by using Options->LibreOffice->Advanced->Open Expert Configuration, searching for UseLocking and setting it to false.

Note: I'm not a LibreOffice user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.