]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed IsOk() for root directory paths
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Feb 2004 18:30:18 +0000 (18:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Feb 2004 18:30:18 +0000 (18:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/filename.h

index b5b9c846017eff611834752729077a8adce99cf2..cbd601e66328158215de9f913aa8dff9aea6d6cc 100644 (file)
@@ -177,7 +177,11 @@ public:
     // file tests
 
         // is the filename valid at all?
-    bool IsOk() const { return m_dirs.size() != 0 || !m_name.IsEmpty(); }
+    bool IsOk() const
+    { 
+        // we're fine if we have the path or the name or if we're a root dir
+        return m_dirs.size() != 0 || !m_name.IsEmpty() || !m_relative;
+    }
 
         // does the file with this name exists?
     bool FileExists() const;