PureBasic Forum
http://forums.purebasic.com/english/

File requester issue
http://forums.purebasic.com/english/viewtopic.php?f=13&t=72971
Page 1 of 1

Author:  kpeters58 [ Thu Jun 06, 2019 10:57 pm ]
Post subject:  File requester issue

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:
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()

Author:  BarryG [ Fri Jun 07, 2019 3:07 am ]
Post subject:  Re: File requester issue

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/openfiledialog-and-lnk-url-files.3848517/

https://stackoverflow.com/questions/1892595/openfiledialog-always-shows-url-internet-shortcut-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).

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/