cleaner implementation
This commit is contained in:
@@ -245,14 +245,13 @@ bool wxCocoaLaunch(const char* const* argv, pid_t &pid)
|
|||||||
for( ; *argv != NULL; ++argv )
|
for( ; *argv != NULL; ++argv )
|
||||||
{
|
{
|
||||||
NSURL *cfurlCurrentFile;
|
NSURL *cfurlCurrentFile;
|
||||||
wxFileName argfn(*argv); // Filename for path
|
|
||||||
wxString dir( *argv );
|
wxString dir( *argv );
|
||||||
if(argfn.DirExists() && argfn.IsDir())
|
if( wxFileName::DirExists(dir) )
|
||||||
{
|
{
|
||||||
// First, try creating as a directory
|
// First, try creating as a directory
|
||||||
cfurlCurrentFile = [NSURL fileURLWithPath:wxCFStringRef(dir).AsNSString() isDirectory:YES];
|
cfurlCurrentFile = [NSURL fileURLWithPath:wxCFStringRef(dir).AsNSString() isDirectory:YES];
|
||||||
}
|
}
|
||||||
else if(argfn.FileExists())
|
else if( wxFileName::FileExists(dir) )
|
||||||
{
|
{
|
||||||
// And if it isn't a directory try creating it
|
// And if it isn't a directory try creating it
|
||||||
// as a regular file
|
// as a regular file
|
||||||
|
Reference in New Issue
Block a user