Help - Search - Members - Calendar
Full Version: how to check for existence of cdda:// location?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
tanka
filesystem::g_exists() crashes when a cdda:// location is input; is there a way to do this check other than catching the error when trying to play a nonexistent cdda://?
gfngfgf
Two methods I can think of off the top of my head. I'm not really sure which one is better (it might depend on what you're doing exactly):

1) filesystem::g_is_remote_or_unrecognized() will return true for "cdda://" locations....but it will also return true for "http://" and others....

2) Is there anything wrong with using this?

CODE
(strcmp_partial(file_path, "cdda://")==0)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.