# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1622158463 0 # Node ID cc2befdc97e85b4aeb0472381d83709a6b6a3aa8 # Parent dbb189c5d398244a4929c5be637d75ff473b2daa iOS: Switch to using the NSURL fileSystemRepresentation method. This allows us to simplify the code automatically removing file:///. diff -r dbb189c5d398 -r cc2befdc97e8 ios/dw.m --- a/ios/dw.m Tue May 25 15:38:55 2021 +0000 +++ b/ios/dw.m Thu May 27 23:34:23 2021 +0000 @@ -941,18 +941,12 @@ NSURL *url = [urls firstObject]; char *file = NULL; - if(url && [[url absoluteString] length] > 0) - { - const char *tmp = [[url absoluteString] UTF8String]; + if(url) + { + const char *tmp = [url fileSystemRepresentation]; if(tmp) - { - /* Strip off file:// so it looks the same as other platforms */ - if(strncmp(tmp, "file://", 7) == 0) - file = strdup(&tmp[7]); - else - file = strdup(tmp); - } + file = strdup(tmp); } dw_dialog_dismiss(dialog, file); }