]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
Conditional compilation fix.
[wxWidgets.git] / src / common / filename.cpp
index 02e83a3506b124d5a71fdae287a745967f8a614f..a746dd77b65b97fb90a7ee4d726b5ad3df392833 100644 (file)
@@ -163,7 +163,8 @@ public:
                      filename,                      // name
                      mode == Read ? GENERIC_READ    // access mask
                                   : GENERIC_WRITE,
-                     0,                             // no sharing
+                     FILE_SHARE_READ |              // sharing mode
+                     FILE_SHARE_WRITE,              // (allow everything)
                      NULL,                          // no secutity attr
                      OPEN_EXISTING,                 // creation disposition
                      0,                             // no flags
@@ -585,7 +586,7 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
     }
 
 #elif defined(__WINDOWS__) && !defined(__WXMICROWIN__)
-#ifdef __WIN32__
+
     if ( dir.empty() )
     {
         if ( !::GetTempPath(MAX_PATH, wxStringBuffer(dir, MAX_PATH + 1)) )
@@ -612,12 +613,6 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
 
         path.clear();
     }
-#else // Win16
-    if ( !::GetTempFileName(NULL, prefix, 0, wxStringBuffer(path, 1025)) )
-    {
-        path.clear();
-    }
-#endif // Win32/16
 
 #else // !Windows
     if ( dir.empty() )
@@ -967,6 +962,7 @@ bool wxFileName::Normalize(int flags,
     {
         // VZ: expand env vars here too?
 
+        m_volume.MakeLower();
         m_name.MakeLower();
         m_ext.MakeLower();
     }
@@ -1147,8 +1143,8 @@ bool wxFileName::SameAs(const wxFileName& filepath, wxPathFormat format) const
 
     // get cwd only once - small time saving
     wxString cwd = wxGetCwd();
-    fn1.Normalize(wxPATH_NORM_ALL & ~wxPATH_NORM_CASE, cwd, format);
-    fn2.Normalize(wxPATH_NORM_ALL & ~wxPATH_NORM_CASE, cwd, format);
+    fn1.Normalize(wxPATH_NORM_ALL wxPATH_NORM_CASE, cwd, format);
+    fn2.Normalize(wxPATH_NORM_ALL wxPATH_NORM_CASE, cwd, format);
 
     if ( fn1.GetFullPath() == fn2.GetFullPath() )
         return true;