]> gitweb.factorcode.org Git - factor.git/commitdiff
cocoa.dialogs: simple fix for split-path errors with empty string input.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 29 May 2017 15:27:58 +0000 (08:27 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 29 May 2017 15:27:58 +0000 (08:27 -0700)
basis/cocoa/dialogs/dialogs.factor

index dcbc8997bca94333ad2ad0ed89f1f3e7b03b611c..74387d63ef4585f16c189cdada4ee27ebb90f0b4 100644 (file)
@@ -32,7 +32,7 @@ CONSTANT: NSCancelButton 0
 : open-dir-panel ( -- paths ) <NSDirPanel> (open-panel) ;
 
 : split-path ( path -- dir file )
-    "/" split1-last [ <NSString> ] bi@ ;
+    "/" split1-last [ "" or <NSString> ] bi@ ;
 
 : save-panel ( path -- path/f )
     [ <NSSavePanel> dup ] dip