]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
correct idle tag type; remove unneeded includes
[wxWidgets.git] / src / common / filename.cpp
index 1be91db75f158297d260f8768edd0e6347ec27ed..91451e445240f23de9d24069e09beda5e2bc49d7 100644 (file)
@@ -1047,7 +1047,9 @@ bool wxFileName::Normalize(int flags,
 #include <shlguid.h>
 #endif
 
-bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, wxString& targetFilename, wxString* arguments)
+bool wxFileName::GetShortcutTarget(const wxString& shortcutPath,
+                                   wxString& targetFilename,
+                                   wxString* arguments)
 {
     wxString path, file, ext;
     wxSplitPath(shortcutPath, & path, & file, & ext);
@@ -1076,6 +1078,8 @@ bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, wxString& targe
                                 MAX_PATH);
 
             hres = ppf->Load(wsz, 0);
+            ppf->Release();
+
             if (SUCCEEDED(hres))
             {
                 wxChar buf[2048];
@@ -1096,11 +1100,13 @@ bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, wxString& targe
                 }
             }
         }
+
+        psl->Release();
     }
-    psl->Release();
     return success;
 }
-#endif
+
+#endif // __WIN32__ && !__WXWINCE__
 
 
 // ----------------------------------------------------------------------------
@@ -2034,7 +2040,10 @@ wxULongLong wxFileName::GetSize(const wxString &filename)
     if (!wxFileExists(filename))
         return wxInvalidSize;
 
-#ifdef __WIN32__
+#if defined(__WXPALMOS__)
+    // TODO
+    return wxInvalidSize;
+#elif defined(__WIN32__)
     wxFileHandle f(filename, wxFileHandle::Read);
     if (!f.IsOk())
         return wxInvalidSize;