fixed IsOk() for root directory paths

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-02-16 18:30:18 +00:00
parent a4411ee220
commit a96b8d39fb

View 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;