Bug 121288 - Save on Sharepoint results in always locked file
Summary: Save on Sharepoint results in always locked file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.3.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords: bibisected, bisected, regression
: 120335 121122 (view as bug list)
Depends on:
Blocks: SharePoint
  Show dependency treegraph
 
Reported: 2018-11-08 18:42 UTC by Gabor Kelemen (allotropia)
Modified: 2018-11-17 16:54 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example odt that cannot be opened again (9.55 KB, application/vnd.oasis.opendocument.text)
2018-11-08 18:42 UTC, Gabor Kelemen (allotropia)
Details
An earlier version of master creates a correctly working file (9.68 KB, application/vnd.oasis.opendocument.text)
2018-11-08 18:43 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the problem: saving the edited file does not work (25.44 KB, image/png)
2018-11-08 18:44 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the problem: reopening the "locked" file (18.43 KB, image/png)
2018-11-08 18:44 UTC, Gabor Kelemen (allotropia)
Details
Trying to open the locked file with Word - it's "locked" by me (24.99 KB, image/png)
2018-11-08 18:52 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-11-08 18:42:27 UTC
Created attachment 146457 [details]
Example odt that cannot be opened again

With current master LO saving to a Sharepoit share results in a file that is continously "locked" for editing. This happens with odt and docx as well, and on opening in LO or Word as well.

To reproduce: 
- Save a new file on a Sharepoint share
- Try to edit it and resave: a window tells there is no permission to write the file.
- Or close it and reopen with LO or Word: a window tells the file is already open by unknown user.

Bibisected with bibisect-win32-6.2 :

git bisect log
# bad: [abecf7aba70fbb5b08acfc14e1c54be2c8c69662] source sha:2cef68a605494bcef0388201b1058c95788c45a8
# good: [b0a56ec98b1368cb5e3e531e0b3f69565af91609] source sha:3a801799536e6870f2fb111b1cc00b9575a35a39
git bisect start 'origin/master' 'oldest'
# good: [9dcaa23557006e78ed974fea7109eb7e5c384bcc] source sha:f71f16b742faa75fe0cab6b899b99ee42d5ec6c7
git bisect good 9dcaa23557006e78ed974fea7109eb7e5c384bcc
# good: [40af77e5ab85dc2093a3e09b05ec67649756652e] source sha:79cb9ef524c3a6b058019da5ca6acfad7a895bf2
git bisect good 40af77e5ab85dc2093a3e09b05ec67649756652e
# good: [40af77e5ab85dc2093a3e09b05ec67649756652e] source sha:79cb9ef524c3a6b058019da5ca6acfad7a895bf2
git bisect good 40af77e5ab85dc2093a3e09b05ec67649756652e
# bad: [9c68d1036dcfeab7612135bac1584bb7a16932a9] source sha:0ed250a9ac4f278ce9ecf12fe1fc9e0c7142fbe4
git bisect bad 9c68d1036dcfeab7612135bac1584bb7a16932a9
# bad: [14d04434e17b2a01f3119a7889f9fde193650f34] source sha:689b6a6ceb88b2c074b77c1030bc2396a1816eea
git bisect bad 14d04434e17b2a01f3119a7889f9fde193650f34
# bad: [14d04434e17b2a01f3119a7889f9fde193650f34] source sha:689b6a6ceb88b2c074b77c1030bc2396a1816eea
git bisect bad 14d04434e17b2a01f3119a7889f9fde193650f34
# bad: [8460501e06eaf32b80d2931b605a0c499d5120eb] source sha:1e79f6f01a8afc55a455b0c52fd5cf2b766e1e08
git bisect bad 8460501e06eaf32b80d2931b605a0c499d5120eb
# bad: [4b50f2299312bb2a66e9d98e6fc80fbbe51c3341] source sha:4ffb89466ff9e70678e807b7d29d94aa34d52bfe
git bisect bad 4b50f2299312bb2a66e9d98e6fc80fbbe51c3341
# good: [8857114212c34e8dd7cf1fa7d35667cf0656110c] source sha:9a639b7130e98fb24d492ed03770bbe0a48cb3e6
git bisect good 8857114212c34e8dd7cf1fa7d35667cf0656110c
# good: [2fa817dbf37120cb2af5b9abfbd1a4922dd54010] source sha:27a2de0bd3f1cf64b9ad3a84b112968941ce6d8e
git bisect good 2fa817dbf37120cb2af5b9abfbd1a4922dd54010
# bad: [d47e9524191ca6297436df8168768fc9873908b5] source sha:a6a4fa526b8ad19ff6d44a89ee56d4268c8e90be
git bisect bad d47e9524191ca6297436df8168768fc9873908b5
# bad: [00aca4cf9c5eba2285b2959bf7aad63a7c34d600] source sha:38cdfcd55f05058e2adfe5bf01e85ca5417649af
git bisect bad 00aca4cf9c5eba2285b2959bf7aad63a7c34d600
# good: [5f39e00793b562820243d8f7063c6b3b98b0eb4f] source sha:bfd2393ca7247aae1b09e661610a5f750b6e06fa
git bisect good 5f39e00793b562820243d8f7063c6b3b98b0eb4f
# bad: [7f76298f730edd25d8b0d1e08d12c23297c4229d] source sha:4d382636b0b1c555af2b98f2f41b4776fd7b5ffb
git bisect bad 7f76298f730edd25d8b0d1e08d12c23297c4229d
# bad: [96a19ce51f497aca182fdc38a6eb0c478e50d067] source sha:c9343988204ee3e9889f3cc833adbbaca83e53e6
git bisect bad 96a19ce51f497aca182fdc38a6eb0c478e50d067
# first bad commit: [96a19ce51f497aca182fdc38a6eb0c478e50d067] source sha:c9343988204ee3e9889f3cc833adbbaca83e53e6

https://gerrit.libreoffice.org/gitweb?p=core.git&a=log&h=c9343988204ee3e9889f3cc833adbbaca83e53e6

Adding CC to Mike Kaganski.
Comment 1 Gabor Kelemen (allotropia) 2018-11-08 18:43:25 UTC
Created attachment 146458 [details]
An earlier version of master creates a correctly working file
Comment 2 Gabor Kelemen (allotropia) 2018-11-08 18:44:09 UTC
Created attachment 146459 [details]
Screenshot of the problem: saving the edited file does not work
Comment 3 Gabor Kelemen (allotropia) 2018-11-08 18:44:58 UTC
Created attachment 146460 [details]
Screenshot of the problem: reopening the "locked" file
Comment 4 Gabor Kelemen (allotropia) 2018-11-08 18:52:20 UTC
Created attachment 146461 [details]
Trying to open the locked file with Word - it's "locked" by me
Comment 5 Gabor Kelemen (allotropia) 2018-11-08 18:59:20 UTC
Also, the files themselves don't seem to be checked out on the SP web UI.
Moving the files to a different directory removes this locked status.
Comment 6 Mike Kaganski 2018-11-08 19:45:08 UTC
Is it correct that the file is being operated using a WebDAV mapped drive on Windows?

Can you please test if https://gerrit.libreoffice.org/63133 fixes the problem?
Comment 7 Gabor Kelemen (allotropia) 2018-11-08 19:49:51 UTC
(In reply to Mike Kaganski from comment #6)
> Is it correct that the file is being operated using a WebDAV mapped drive on
> Windows?
> 
Yes!

> Can you please test if https://gerrit.libreoffice.org/63133 fixes the
> problem?

My team will take a look, thanks!
Comment 8 Commit Notification 2018-11-10 13:19:14 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/603b63b4c154882ecfe95ae3c6960b08eb9fb626%5E%21

tdf#121288: ReplaceFile WinAPI doesn't play nicely with WebDAV mapped drives

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 9 Gabor Kelemen (allotropia) 2018-11-10 14:04:33 UTC
*** Bug 120335 has been marked as a duplicate of this bug. ***
Comment 10 Aron Budea 2018-11-12 05:29:10 UTC
*** Bug 121122 has been marked as a duplicate of this bug. ***
Comment 11 Commit Notification 2018-11-17 16:54:06 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/f0388c306edfce91241d59420e96a5b2b1c939f5%5E%21

tdf#121288: ReplaceFile WinAPI doesn't play nicely with WebDAV mapped drives

It will be available in 6.1.4.

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

Affected users are encouraged to test the fix and report feedback.