]> git.saurik.com Git - wxWidgets.git/commitdiff
IsDir() test is pretty useless, use DirExists
authorJulian Smart <julian@anthemion.co.uk>
Wed, 1 Nov 2006 15:30:38 +0000 (15:30 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 1 Nov 2006 15:30:38 +0000 (15:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filename.cpp

index 64b49c49108d5b7fa32f7706746666093a90c6fb..88fe2d48eadcdf14656189354bbd646d1b02dd06 100644 (file)
@@ -2216,7 +2216,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
     // not 9x
     bool ok;
     FILETIME ftAccess, ftCreate, ftWrite;
-    if ( IsDir() )
+    if ( DirExists() ) // Don't use IsDir, because it returns false even if it's a directory
     {
         // implemented in msw/dir.cpp
         extern bool wxGetDirectoryTimes(const wxString& dirname,