Attila Kovacs 629 Posted November 10, 2022 7 minutes ago, Sherlock said: Just for completeness sake it should be noted, that FileExists will raise an exception, if the current user has insufficient rights to read the file. in the very next second it could have the rights and vice versa Share this post Link to post
David Heffernan 2345 Posted November 10, 2022 4 hours ago, Sherlock said: Just for completeness sake it should be noted, that FileExists will raise an exception, if the current user has insufficient rights to read the file. In what version of Delphi is this? Are you sure that it raises an exception? If it does then that is a change of behaviour from the XE days. 2 Share this post Link to post
Remy Lebeau 1393 Posted November 10, 2022 (edited) 7 hours ago, Sherlock said: Just for completeness sake it should be noted, that FileExists will raise an exception, if the current user has insufficient rights to read the file. I don't have an up-to-date version to verify this with, but I seriously doubt what you claim is true. Up to at least XE8, FileExists() was never coded to raise any exceptions. I can't imagine Embarcadero would ever add exception handling to FileExists() in the years since that release. Edited November 10, 2022 by Remy Lebeau 1 Share this post Link to post
Sherlock 663 Posted November 11, 2022 (edited) Just happened to me in at least 10.4.2 may even be so in 11.2. But maybe it is something else, will try to put together a small demo, time permitting. Edited November 11, 2022 by Sherlock Own stupudity Share this post Link to post
Sherlock 663 Posted November 11, 2022 So, I have no Idea, what the issue really is, it is not FileExists. At least the way I try to reproduce missing privileges no exception is raised... so I retract that statement as bogus. Sorry for the fuss. Share this post Link to post