Bug 119381 - 6.1 overwrites Symbolic Links with files
Summary: 6.1 overwrites Symbolic Links with files
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.2.0 target:6.1.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: rename-before-copy-regressions
  Show dependency treegraph
 
Reported: 2018-08-20 10:26 UTC by roguzuh
Modified: 2019-05-27 04:31 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roguzuh 2018-08-20 10:26:02 UTC
Description:
Opening a link to a file, the file opens but when saving, Libreoffice overwrites the link instead of the old file. This did not happen before upgrading to 6.1.0.3 from 6.0.6. Happens every time with writer, calc and probably all apps.

Steps to Reproduce:
1.Link a file to somewhere else.
2.Open the link with Libreoffice.
3.Save.

Actual Results:
Link is gone, replaced by the modified file itself.

Expected Results:
Link should still point to the modified file.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Jean-Baptiste Faure 2018-08-21 09:17:12 UTC
Confirmed with LibreOffice 6.1.1.0.0+ built at home under Ubuntu 18.04 x86-64.

Status set to NEW. Keyword regression because symlinks are conserved in previous versions.

Best regards. JBF
Comment 2 Raould 2018-08-22 06:38:49 UTC
I am also suffering this problem.  Linux Mint 19, 64-bit, with LibreOffice 6.1.0.3.  Was not a problem with previous versions.
Comment 3 Xisco Faulí 2018-08-22 13:29:06 UTC Comment hidden (obsolete)
Comment 4 roguzuh 2018-08-22 15:54:14 UTC
I'm sorry. In your file manager, you link a text file to somewhere else (drag to other folder while holding ALT key in most file managers). Afterwards you  open it with libreoffice (by double-clicking the link in your file manager/desktop or using CTRL-O from inside libreoffic). Then you safe (CTRL-S).
Comment 5 Raould 2018-08-22 19:48:50 UTC
I have files in several directories that I use daily.  Rather than using the file manager to navigate to those directories each time I want to work on them, I create a link on my desktop for each file.

In the past, when I clicked on a link on the desktop, LibreOffice would open the file (in whatever directory it really resides); I would edit the file and save it; LibreOffice would save the file back to the directory.

As of 6.1, LibreOffice is NOT saving the file back to the directory in which it really resides, but is overwriting the LINK on my desktop.  Thus, what was a link is now file, and the "real" file in that other directory is never updated.
Comment 6 Xisco Faulí 2018-08-23 09:08:23 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=2157a3536f97ff5ae7c82611a801fef7e3708983

author	Miklos Vajna <vmiklos@collabora.co.uk>	2018-01-08 16:49:25 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-01-09 09:09:27 +0100
commit 2157a3536f97ff5ae7c82611a801fef7e3708983 (patch)
tree 1f7e5267a0d97d55800f20f73fa3f022023abc28
parent 5259ab8104cfba60c40748ed0cd59d93df038c5b (diff)
sfx2 store: try rename before copying
Rename is cheaper then copying the content over manually, so try that
first.

Bisected with: bibisect-linux64-6.1

Adding Cc: to Miklos Vajna
Comment 7 Commit Notification 2018-09-04 12:34:18 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#119381 sfx2 store: don't break symlink targets

It will be available in 6.2.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 8 Xisco Faulí 2018-09-10 14:34:12 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 433fce6571d4b9121374047324a7d2d2722ac3e4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Miklos, Thanks for fixing this!!!
Comment 9 Commit Notification 2018-09-10 15:45:37 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ec028a73aca92c9d16484d4803852526a1d845a1&h=libreoffice-6-1

tdf#119381 sfx2 store: don't break symlink targets

It will be available in 6.1.2.

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 10 Commit Notification 2018-09-10 20:07:28 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-1-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c51a113b30d02e51f16484faa2550d56880f453b&h=libreoffice-6-1-1

tdf#119381 sfx2 store: don't break symlink targets

It will be available in 6.1.1.

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 11 Nigel Arnot 2018-10-23 10:55:03 UTC
Tested "Fresh" 6.1.2.1 on Fedora 27 and 28. I can confirm that he problem is fixed.