]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
disable select root menu command when the root is hidden
[wxWidgets.git] / src / common / filename.cpp
index 52a8dcd29625f5f8b3cb1530adfe46a42f72ee55..3c5764a6bb7a4b0061ef60eaba6fdf15ae929f2d 100644 (file)
@@ -2331,14 +2331,11 @@ wxULongLong wxFileName::GetSize(const wxString &filename)
 
     DWORD lpFileSizeHigh;
     DWORD ret = GetFileSize(f, &lpFileSizeHigh);
-    if (ret == INVALID_FILE_SIZE)
+    if ( ret == INVALID_FILE_SIZE && ::GetLastError() != NO_ERROR )
         return wxInvalidSize;
 
-    // compose the low-order and high-order byte sizes
-    return wxULongLong(ret | (lpFileSizeHigh << sizeof(WORD)*2));
-
-#else           // ! __WIN32__
-
+    return wxULongLong(lpFileSizeHigh, ret);
+#else // ! __WIN32__
     wxStructStat st;
 #ifndef wxNEED_WX_UNISTD_H
     if (wxStat( filename.fn_str() , &st) != 0)