#PB_FileSystem_Link not detecting on 6.10 LTS on Sonoma 14.4.1

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
OriginalPaladin
User
User
Posts: 13
Joined: Wed Apr 10, 2024 1:56 pm

#PB_FileSystem_Link not detecting on 6.10 LTS on Sonoma 14.4.1

Post by OriginalPaladin »

Hello,

I've written an app that deals with file and directory attributes and the #PB_File... attributes all seem to work fine except for #PB_FileSystem_Link. I've tested the same app/code on Linux and it is detecting linked files fine, but it is no longer detecting them on MacOS for me. It worked fine on Monterey and with, I believe, 6.04, but with Sonoma 14.4.1 and PB 6.10 LTS (demo) it no longer seems to be detecting linked files. Here's my code sample (sorry, forgot to include it initially):

CheckBoxGadget(49, 10, 40, 250, 20, "Is Link")
DisableGadget(49, #True)

Value = GetFileAttributes(File$)
If Value = -1
Debug "Error reading file attributes!"
Else
If Value & #PB_FileSystem_Link : DisableGadget(49, #False) :SetGadgetState(49,#PB_Checkbox_Checked) : DisableGadget(49, #True) : EndIf
If Value & #PB_FileSystem_ReadUser : SetGadgetState(2,#PB_Checkbox_Checked) : EndIf
If Value & #PB_FileSystem_WriteUser : SetGadgetState(3,#PB_Checkbox_Checked) : EndIf
If Value & #PB_FileSystem_ExecUser : SetGadgetState(4,#PB_Checkbox_Checked) : EndIf
If Value & #PB_FileSystem_ReadGroup : SetGadgetState(5,#PB_Checkbox_Checked) : EndIf
If Value & #PB_FileSystem_WriteGroup: SetGadgetState(6,#PB_Checkbox_Checked) : EndIf
If Value & #PB_FileSystem_ExecGroup : SetGadgetState(7,#PB_Checkbox_Checked) : EndIf
If Value & #PB_FileSystem_ReadAll : SetGadgetState(8,#PB_Checkbox_Checked) : EndIf
If Value & #PB_FileSystem_WriteAll : SetGadgetState(9,#PB_Checkbox_Checked) : EndIf
If Value & #PB_FileSystem_ExecAll : SetGadgetState(10,#PB_Checkbox_Checked) : EndIf
EndIf
OriginalPaladin
User
User
Posts: 13
Joined: Wed Apr 10, 2024 1:56 pm

Re: #PB_FileSystem_Link not detecting on 6.10 LTS on Sonoma 14.4.1

Post by OriginalPaladin »

So this problem appears to be with OpenFileRequester or what it is doing now in Sonoma. OpenFileRequester is following the link to the linked file and returning the linked file, instead of the link itself. I do not believe this was the case before, but I'm not sure if it's a MacOS issue or a PB issue. My code used to work fine on a slightly older version of PB and Ventura, but now it's following the link. I apologize if I've overlooked something obvious, I'm somewhat new to PB, but any help with this would be greatly appreciated. I would like OpenFileRequester to open the link file, not what it is linked to, if at all possible.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: #PB_FileSystem_Link not detecting on 6.10 LTS on Sonoma 14.4.1

Post by Fred »

I don't think it ever worked that way (not following the link) as we specifically set "[Panel setResolvesAliases:YES];" which tells the requester to do so (it was never changed). That said, it could be a OK for a new flag to disallow this.
Post Reply