]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
applied ANI images patch and added wxUSE_ICO_CUR
[wxWidgets.git] / src / common / filefn.cpp
index 4bbe6747d1f7dd80aea9bd1ae7fb4fba14b6ab40..13fafb9b9f013ecb282c27a1570d58a1751e0aad 100644 (file)
     #endif
 #endif
 
+#if defined(__WXMAC__)
+  #include  "wx/mac/private.h"  // includes mac headers
+#endif
+
 #include <time.h>
 
 #ifndef __MWERKS__
@@ -563,7 +567,6 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
 
     /* Expand ~ and ~user */
     nm = lnm;
-    s = wxT("");
     if (nm[0] == wxT('~') && !q)
     {
         /* prefix ~ */
@@ -587,7 +590,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
             if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL) {
                if (was_sep) /* replace only if it was there: */
                    *s = SEP;
-                s = wxT("");
+                s = NULL;
             } else {
                 nm = nnm;
                 s = home;
@@ -1519,11 +1522,9 @@ wxString wxGetOSDirectory()
 
 bool wxEndsWithPathSeparator(const wxChar *pszFileName)
 {
-  size_t len = wxStrlen(pszFileName);
-  if ( len == 0 )
-    return FALSE;
-  else
-    return wxIsPathSeparator(pszFileName[len - 1]);
+    size_t len = wxStrlen(pszFileName);
+
+    return len && wxIsPathSeparator(pszFileName[len - 1]);
 }
 
 // find a file in a list of directories, returns false if not found