From 21063a78508a327878b1db1923a8710abc10df1a Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 5 Nov 2019 21:26:03 +0100 Subject: [PATCH] cleaner implementation --- src/osx/cocoa/utils_base.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/osx/cocoa/utils_base.mm b/src/osx/cocoa/utils_base.mm index e84c49c6c3..d11829338b 100644 --- a/src/osx/cocoa/utils_base.mm +++ b/src/osx/cocoa/utils_base.mm @@ -245,14 +245,13 @@ bool wxCocoaLaunch(const char* const* argv, pid_t &pid) for( ; *argv != NULL; ++argv ) { NSURL *cfurlCurrentFile; - wxFileName argfn(*argv); // Filename for path wxString dir( *argv ); - if(argfn.DirExists() && argfn.IsDir()) + if( wxFileName::DirExists(dir) ) { // First, try creating as a directory 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 // as a regular file