Bug 123625

Summary: getattr fails with \..
Product: LibreOffice Reporter: Heinrich Hartl <Heinrich.Hartl>
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: andreas.heinisch, buzea.bogdan, himajin100000, oliver.brinzing
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107659    
Attachments: provides Testinstructions and macro TestGetAddr

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.