From a96b8d39fbac340c3533a414a127f3c326093312 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 16 Feb 2004 18:30:18 +0000 Subject: [PATCH] fixed IsOk() for root directory paths git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/filename.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.50.0