Bug 109341 - PathSettings do not provide correct Path
Summary: PathSettings do not provide correct Path
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: BASIC-IDE
  Show dependency treegraph
 
Reported: 2017-07-25 15:40 UTC by Thomas Krumbein
Modified: 2024-03-11 14:45 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Pic1 - result LO (5.3.x or 5.4.0 Linux/windows) (10.49 KB, image/png)
2017-07-25 15:40 UTC, Thomas Krumbein
Details
Pic2 - result OpenOffice 4.x and expected result (4.11 KB, image/png)
2017-07-25 15:41 UTC, Thomas Krumbein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Krumbein 2017-07-25 15:40:02 UTC
Description:
When I use the service "com.sun.star.util.PathSettings" or the singleton "thePathSettings", the delivered path for all internal LO pathes are in a very strange format and not direct usable. 

For example: 
"module" delivers the following path:
"file:///C:/Program%20Files/LibreOffice%205/program/../program"

Steps to Reproduce:
1. create a basic code :


Sub Main
  oPath = createUnoService("com.sun.star.util.PathSettings")
  
  msgbox oPath.module
End Sub

or use singleton:

Sub Main
  oPath = getDefaultContext.getValueByName("/singletons/com.sun.star.util.thePathSettings")
  
  msgbox oPath.module
End Sub

2. run the Macro
3.

Actual Results:  
see pic1 (path2.png)

Expected Results:
as in former times... I expected an usable path-string. 

for example: OpenOffice still delivers the correct path (see pic2 path.png)




Reproducible: Always

User Profile Reset: No

Additional Info:
I checked this behavior even with the 5.3.x line of LO, same strange result.

No difference between Linux or Windows versions.

Seems to me, that there is a problem of resolving internal of the returned string. 

I can read the string... means file:///....../progam -> go back one folder (..) -> add folder /<text>   

But I need the correct pathname as for example will delivered by "work" or "temp". 


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Comment 1 Thomas Krumbein 2017-07-25 15:40:52 UTC
Created attachment 134842 [details]
Pic1 - result LO (5.3.x or 5.4.0 Linux/windows)
Comment 2 Thomas Krumbein 2017-07-25 15:41:38 UTC
Created attachment 134843 [details]
Pic2 - result OpenOffice 4.x and expected result
Comment 3 Buovjaga 2017-08-13 16:52:44 UTC
Weird behaviour confirmed in 3.6.

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 4 QA Administrators 2018-08-14 02:32:43 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2020-12-13 03:46:14 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2022-12-14 03:20:55 UTC Comment hidden (obsolete)
Comment 8 Rafael Lima 2023-04-17 14:42:25 UTC
I can only reproduce this issue on Windows.

On Linux I do not get the weird "program/../program" part.
Comment 9 Oliver Brinzing 2024-03-11 14:45:23 UTC
confirming 

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: default