[Libreoffice-bugs] [Bug 95336] FILESAVE Saving a Document with "#" in name ( libreoffice dialogs)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Dec 9 18:36:21 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=95336

--- Comment #7 from Alex H. <alexhfromnorthholland at gmail.com> ---
Still occurs in this build, which I built myself:

Version: 6.1.0.0.alpha0+ (x64)
Build ID: 7c77ff5dd2d0573a56f8b59dc9113c23e0ea29c9
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL

although I don't get an error; instead it just chops off the # and anything
following it.

Steps to reproduce:

1. As said, this problem doesn't occur with Windows' built-in dialogs,
   so you may first have to go to Tools > Options and then 'General'
   and check the box 'Use LibreOffice dialogs'.
2. For any Calc document, select File > Save As... and type "abc#def"
   as the file name.

Expected behavior:
Should save the file under that name.

Actual behavior:
Saves it as "abc.ods".

-------------

The problem here is that the dialog ModelData_Impl::OutputFileDialog
(libo-core\sfx2\source\doc\guisaveas.cxx) treats the full path as an URL, so
for a local file it comes out as e.g.
"file:///C:/users/john/Documents/abc#def.ods". The # is then seen as the
beginning of a so-called fragment and chopped off.

Note, for the record, that Windows forbids certain characters like '*' in file
names, but '#' is allowed. See
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20171209/4b9cc3c1/attachment.html>


More information about the Libreoffice-bugs mailing list