From: Vadim Zeitlin Date: Mon, 16 Feb 2004 18:30:18 +0000 (+0000) Subject: fixed IsOk() for root directory paths X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a96b8d39fbac340c3533a414a127f3c326093312 fixed IsOk() for root directory paths git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/filename.h b/include/wx/filename.h index b5b9c84601..cbd601e663 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -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;