Launchpad has imported 1 comments from the remote bug at https://bugs.documentfoundation.org/show_bug.cgi?id=128196.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2019-10-17T10:00:23+00:00 Christian Pernegger wrote: Description: [This was originally reported on the Ubuntu bug tracker, see https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1846790, where it's been requested that I kick it upstream, on the grounds that the official 6.3.2 .deb is also affected. I've taken the liberty of expanding it and simplifying the test cases.] Somehow, when LibreOffice saves a file containing '#' on a Samba share accessed via a GVFS smb:// path the filename gets truncated at the first '#', inclusive, suffix and all, before the save actually happens. As a result, the data isn't saved where the user intended, so from their perspective, it didn't save at all. Without an error message or any indication that something didn't work. What's worse, if the truncated destination file already exists, it is silently overwritten, causing actual data loss, in unrelated data. '#' in directory names are ok. The problem does not occur with local files or on a sshfs-mount. Gedit has no problem even on smb://. It's unclear whether '#' is the only character affected. Some kind of URL handling/escaping bug in LibreOffice's GIO support? In any case, this cost me a day of work. (By the time I realised my changes hadn't actually been lost but landed in a new, cryptically-named file, I'd already recreated it to meet the deadline.) Steps to Reproduce: Save a file whose name contains a '#' character to a Samba share accessed via a GVFS smb:// path. Ex. 1: Open a blank Writer (ODT) document, save that under the name "Test#1.odt" on a Samba share mounted via Nautilus. Ex. 2: Open a pre-existing file "Test#2.odt", either via Nautilus or File-Open, make some changes, save it & quit. Ex. 3: As either of the above, but with "Test #3.odt" being the intended filename. [This is the original bug/test case.] Actual Results: Ex. 1: LibreOffice actually saves the data in a file named "Test" [note the lack of an extension]. Ex. 2: The original file remains untouched, but a new file "Test" is created. Ex. 3: The data goes to "Test " [note the space at the end], which displays as "TFNZPF~F" on the client. (Filenames ending in a space aren't legal under Windows, so Samba's name mangling kicks in.) Expected Results: The file shows up under the assigned name (in case of a new file); or the existing file now contains the changes made (in case of an existing file being modified). Ex. 1: I'd expect to see "Test#1.odt" in the relevant directory. Ex. 2: I'd expect "Test#2.odt" to contain my changes. Ex. 3: As above, but for "Test #3.odt". Reproducible: Always User Profile Reset: No Additional Info: Version: 6.0.7.3 Build-ID: 1:6.0.7-0ubuntu0.18.04.10 CPU-Threads: 24; BS: Linux 5.0; UI-Render: Standard; VCL: gtk3; Gebietsschema: de-AT (de_DE.UTF-8); Calc: group This is the Ubuntu 18.04 (bionic) distro version of LO. I'm not sure if OpenGL is active or not, the info on where to check doesn't seem to be applicable. Linux Mint 19.3 (Cinnamon) is also affected. Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1846790/comments/3 ** Changed in: df-libreoffice Status: Unknown => New ** Changed in: df-libreoffice Importance: Unknown => Medium -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libreoffice in Ubuntu. https://bugs.launchpad.net/bugs/1846790 Title: Saving files with a '#' in the name silently(!) fails on GVFS smb:// paths (Samba share) Status in LibreOffice: New Status in libreoffice package in Ubuntu: Confirmed Bug description: [Reported via ubuntu-bug, I'm assuming it has gathered all relevant system info. More, especially on the Samba server, if required, is available on request.] What I'm trying to do: Save a file whose name contains a '#' character to a Samba share accessed via a GVFS smb:// path. Ex. 1: Open a blank Writer (ODT) document, save that under the name "Test #1.odt" on a Samba share mounted via Nautilus. Ex. 2: Open a pre-existing file "Test #2.odt", either via Nautilus or File-Open, make some changes, save it & quit. What I'm expecting to happen: The file shows up under the assigned name on both the client and the Samba server (in case of a new file); or the existing file now contains the changes made (in case of an existing file being modified). Ex. 1: I'd expect to see "Test #1.odt" in the relevant directory. Ex. 2: I'd expect "Test #2.odt" to contain my changes. What happens instead: Ex. 1: LibreOffice actually saves the data in a file named "TFNZPF~F" as seen from the client, "Test " [note the space at the end] on the server. Ex. 2: The original file remains untouched, but a new file "TFNZPF~F" (client), or "Test " (server) is created with the saved data. Effectively, the save operation does not succeed -- without any error message. Analysis: This is based on experiments with more complex filenames. Somehow, when LibreOffice saves a file in this constellation, the filename gets truncated at the first '#', inclusive, first, suffix and all. (This in turn leaves a filename ending in a space, which isn't legal under Windows, so Samba's name mangling kicks in.) The problem does not occur with local files or on a sshfs-mount. Gedit has no problem even on smb://. It's unclear whether '#' is the only character affected. Some kind of URL handling/escaping bug in LibreOffice's GIO support? In any case, this cost me a day of work. (By the time I realised my changes hadn't actually been lost but landed in a new, cryptically- named file, I'd already recreated it to meet the deadline.) ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: libreoffice-gnome 1:6.0.7-0ubuntu0.18.04.10 ProcVersionSignature: Ubuntu 5.0.0-29.31~18.04.1-generic 5.0.21 Uname: Linux 5.0.0-29-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.7 Architecture: amd64 CurrentDesktop: ubuntu:GNOME Date: Fri Oct 4 17:12:21 2019 InstallationDate: Installed on 2019-09-23 (10 days ago) InstallationMedia: Ubuntu 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805) SourcePackage: libreoffice UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/df-libreoffice/+bug/1846790/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

