- if (fullURLRef)
- {
- CFStringRef cfString = ::CFURLCopyPath(fullURLRef);
- ::CFRelease(fullURLRef);
-
- if (cfString)
- {
- // unescape the URL for
- // "file name" instead of "file%20name"
- CFStringRef cfStringUnescaped =
- ::CFURLCreateStringByReplacingPercentEscapes(NULL,
- cfString,
- CFSTR(""));
- ::CFRelease(cfString);
-
- if (cfStringUnescaped)
- {
-#if wxUSE_UNICODE
- ::CFStringGetCString(cfStringUnescaped,
- thePath,
- FILENAME_MAX,
- kCFStringEncodingUnicode);
-#else
- ::CFStringGetCString(cfStringUnescaped,
- thePath,
- FILENAME_MAX,
- CFStringGetSystemEncoding());
-#endif
- ::CFRelease(cfStringUnescaped);
- }
- }
- }
- }
- if (!thePath[0])
- {
- ::NavDisposeReply(&navReply);
- return wxID_CANCEL;