diff mac/dw.m @ 1704:873304f581be

Fix Unicode issues with the directory browser on Windows. Fix a hang with the directory browser on Mac when passing an empty string.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 05 May 2012 06:48:40 +0000
parents e19b93a8229b
children 3fa0448d3a7e
line wrap: on
line diff
--- a/mac/dw.m	Thu May 03 18:44:08 2012 +0000
+++ b/mac/dw.m	Sat May 05 06:48:40 2012 +0000
@@ -3208,7 +3208,7 @@
     /* Figure out path information...
      * These functions are only support in Snow Leopard and later...
      */
-    if(defpath && DWOSMinor > 5)
+    if(defpath && *defpath && DWOSMinor > 5)
     {
         struct stat buf;
         
@@ -3273,7 +3273,7 @@
         }
         
         /* Handle file types */
-        if(ext)
+        if(ext && *ext)
         {
             NSArray* fileTypes = [[[NSArray alloc] initWithObjects:[NSString stringWithUTF8String:ext], nil] autorelease];
             [openDlg setAllowedFileTypes:fileTypes];
@@ -3314,7 +3314,7 @@
         [saveDlg setCanCreateDirectories:YES];
 
         /* Handle file types */
-        if(ext)
+        if(ext && *ext)
         {
             NSArray* fileTypes = [[[NSArray alloc] initWithObjects:[NSString stringWithUTF8String:ext], nil] autorelease];
             [saveDlg setAllowedFileTypes:fileTypes];