Bug 142041 - New "Files > Properties > General > Location" link feature doesn't work on Windows
Summary: New "Files > Properties > General > Location" link feature doesn't work on Wi...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Hardware: All Windows (All)
: medium normal
Assignee: Heiko Tietze
Whiteboard: target:7.2.0
Depends on:
Reported: 2021-05-03 00:26 UTC by Ming Hua
Modified: 2021-05-26 13:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Ming Hua 2021-05-03 00:26:54 UTC
This new feature added in 7.2 doesn't work for me.  Steps to reproduce:

1. Fresh profile, start LibreOffice and open an ODT file.

2. Menu File > Properties..., General tab in the pop-up dialog.

3. The folder containing the file is listed after "Location:", and is a clickable link.

4. Click it, an dialog with error messages pops up:
(com.sun.star.lang.IllegalArgumentException) { { { Message = "XSystemShellExecute.execute, getSystemPathFromFileURL <file://C:\\Users\\Public\\Documents> failed with 21", Context = (com.sun.star.uno.XInterface) @0 } }, ArgumentPosition = (short) 0 }

Expected result:
No error message, the folder is opened in Windows file explorer.

Version information:
Daily build MSI installer downloaded from dev-builds.libreoffice.org on 2021-05-01:
Version: (x64) / LibreOffice Community
Build ID: 18e5e948dd66e41f17b0a63bf631d98aee84a03b
CPU threads: 2; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded

Also reproducible with English UI.
Comment 1 Vadym 2021-05-12 12:24:00 UTC
Thank you for reporting the bug. I can confirm that the bug is present in version
Comment 2 Ming Hua 2021-05-13 23:06:16 UTC
Heiko, since you added this feature, would you please have a look?

If you can't debug/fix because you are not familiar with Windows, would you at least disable this feature on Windows?  Thanks.
Comment 3 Heiko Tietze 2021-05-14 08:36:50 UTC
Mike, I suspect set_uri("file://" + aText); is not working on Windows. Any tip what's exactly wrong, maybe backslash?
Comment 4 Mike Kaganski 2021-05-14 08:49:09 UTC
(In reply to Heiko Tietze from comment #3)
> Mike, I suspect set_uri("file://" + aText); is not working on Windows.

Oh of course this is wrong on any platform, and may work on *nix just by chance, and not always. The proper way would be *converting* a system path to URL, e.g. using osl::FileBase::getFileURLFromSystemPath.
Comment 5 Commit Notification 2021-05-18 06:56:02 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":


Resolves tdf#142041 - Hyperlink to file location

It will be available in 7.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:

Affected users are encouraged to test the fix and report feedback.
Comment 6 BogdanB 2021-05-26 13:45:47 UTC
Working well now.

Verified in
Version: (x64) / LibreOffice Community
Build ID: 08e99279226206db8ce83cdebc4cf2994739e90b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded