File requester issue

Just starting out? Need help? Post your questions and find answers here.
User avatar
kpeters58
Enthusiast
Enthusiast
Posts: 341
Joined: Tue Nov 22, 2011 5:11 pm
Location: Kelowna, BC, Canada

File requester issue

Post by kpeters58 »

Using the proc below works as expected - until I navigate to my Desktop folder (Win10) and there it also lists all web shortcuts (*.url) I have on my desktop.
Do others see this phenomenon as well?

Code: Select all

Global StartFile.s

Procedure SelectFile()
  Protected pattern.s = "PureBasic files (*.pb, *.pbi, *.pbp)|*.pb;*.pbi;*.pbp", patternindex = 0
    
  StartFile = OpenFileRequester("Select a Purebasic file/project", "", pattern, patternindex)
  Debug StartFile
EndProcedure

SelectFile()
PB 5.73 on Windows 10 & OS X High Sierra
BarryG
Addict
Addict
Posts: 3294
Joined: Thu Apr 18, 2019 8:17 am

Re: File requester issue

Post by BarryG »

Confirmed here. Also does it for *.url files anywhere on my Win 10 hard drive (not just the desktop).

But it seems to be a normal Windows behavior (not a PureBasic bug):

https://www.pcreview.co.uk/threads/open ... s.3848517/

https://stackoverflow.com/questions/189 ... tcut-files

There's apparently a way to hook the dialog to not show them, as mentioned in the second link above, but it's a lot of work.

The first link above says the *.url links are shown because the shortcuts could point to one of the files in your filter (such as a *.pb file on a website or network folder).
Post Reply