That is interesting ... great detective work! So the more correct approach is probably to detect urls being returned on all platforms. Given a colon is not an allowed in a file path in MacOS it would be easy to screen it out on MacOS. But given Windows filepaths use colons after drive letters, and custom url schemes are legal (calibre, sigil, http, https, ftp, file, etc, etc, then a simple screen would probably not be easy. Maybe as BeckyEbook suggested we use Utility::IsFileReadable and see if that returns without crashing, but it may use QFileInfo too.
Which way do you want to go?
|