diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index bff8bd1bc7..99a1f807a6 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -879,6 +879,9 @@ wxString wxPathOnly (const wxString& path) // Unix like or Windows if (path[i] == wxT('/') || path[i] == wxT('\\')) { + // Don't return an empty string + if (i == 0) + i ++; buf[i] = 0; return wxString(buf); }