Bug Hunting Session
Bug 115742 - Can't save over a file if there is a lingering lock file from a different user
Summary: Can't save over a file if there is a lingering lock file from a different user
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: File-Lock
  Show dependency treegraph
 
Reported: 2018-02-15 11:06 UTC by Aron Budea
Modified: 2018-04-03 10:58 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Error message (5.69 KB, image/png)
2018-02-15 11:07 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-02-15 11:06:10 UTC
- While an existing file is open, save its lock file,
- Edit it with a text editor manually by replacing the user name in the first field with a different one (it's in ",Computer/User," form), eg. add a character to it,
- Place it next to the original file when the file is not open,
- Try saving an empty document over the file.

=> There is an error (see screenshot).
Similar to bug 108210, which was about opening such files, it should be possible to save over files that are protected by lock files, but there is no corresponding file system lock (if otherwise there's supposed to be). For example this could happen if the locking LO instance crashed.

Observed using LO 6.1 daily build (2018-02-14_23:48:44, 09fcdbd5e0ae35fb7db8c8784329035edd82573b).
Comment 1 Aron Budea 2018-02-15 11:07:20 UTC
Created attachment 139922 [details]
Error message
Comment 2 Mike Kaganski 2018-02-26 15:02:03 UTC
https://gerrit.libreoffice.org/50371
Comment 3 Commit Notification 2018-02-26 19:45:41 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a30f8c4daaab5bfc850c18b2b0bce3fdb2281a1f

tdf#115742: allow ignoring stale lockfile on save

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Xisco Faulí 2018-03-29 09:12:35 UTC
A polite ping to Mike Kaganski: is this bug fixed? if so, could you
please close it as RESOLVED FIXED ? Thanks