Bug 123625 - getattr fails with \..
Summary: getattr fails with \..
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro
  Show dependency treegraph
 
Reported: 2019-02-21 12:37 UTC by Heinrich Hartl
Modified: 2023-04-21 15:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
provides Testinstructions and macro TestGetAddr (13.60 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-02-21 12:37 UTC, Heinrich Hartl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heinrich Hartl 2019-02-21 12:37:31 UTC
Created attachment 149479 [details]
provides Testinstructions and macro TestGetAddr

Test instructions
The macro TestGetAttr contained in attached .ods can only be executed if security allows to do so.
You may need to go to tools / Options / security / Macro Security and allow level medium.
With level medium set, reopen this file – you will be prompted to allow macro execution

Tools / Macros /Run Macros / select Macro TestGetAttr found in this TestGetAttr_1.ods (or what ever is the actual name) / standard / TestGetAttr
Confirm Msg-boxes (click ok). The last one will report a failure
 when called for c:\users\..
Comment 1 Oliver Brinzing 2019-02-21 18:19:40 UTC
attached macro will fail with AOO 4.1.5 too, so it never worked at all.
Comment 2 QA Administrators 2021-02-21 03:57:40 UTC Comment hidden (obsolete)
Comment 3 Andreas Heinisch 2021-04-11 08:10:38 UTC
Still confirmed in:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ce9f23c6196b17985d14e441aa93175b31650f34
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL

However, LO tries to retrieve the information for GetAttr using the function FindFirstFileW, which reads the directory entry in the parent directory. A drive root doesn't have a parent directory, so GetAttr will not work on "c:\users\..", but works in "c:\users\public\..".

Maybe something about the volume itself can be checked using GetVolumeInformationW.
Comment 4 Andreas Heinisch 2021-10-12 07:04:23 UTC
Patch https://gerrit.libreoffice.org/c/core/+/113964

However, I cannot decide if this should be merged or not.