https://bugs.documentfoundation.org/show_bug.cgi?id=157450
Bug ID: 157450
Summary: File is opened in read-only mode, when using an
invalid file URL with backslashes on Windows
Product: LibreOffice
Version: unspecified
Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: sdk
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Consider this BASIC code:
Sub UseInvalidURL
StarDesktop.loadComponentFromURL("file:///D:\Documents\test.odt", "_blank",
0, Array())
End Sub
Given that you have such a file (D:\Documents\test.odt), this code would manage
to open the file (even considering that the file URL is invalid, containing
backslashes), but when opening, it will issue a warning that the lockfile
couldn't be created, and offer to open it in read-only mode.
A consistent behavior could be one of:
* Either to disallow invalid URLs at all (so fail opening the document) -
unlikely, given how widespread the use of such "URLs" is on Windows, where
users simply concatenate "file:///" with the system path;
* Or if they are handled, then sanitize them, so that the rest of operations
would work correctly, including lockfile generation.
Still, one valid outcome for this issue could be WONTFIX, based on GIGO
principle. Stephan, what would you advise here - should it be fixed or not?
--
You are receiving this mail because:
You are the assignee for the bug.