X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..bddea8d14f589691b9314fad84dbc51cb9af7c81:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index f94b3f5d91..4f7becfebb 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -635,11 +635,11 @@ wxFileName wxFileSystem::URLToFileName(const wxString& url) path = wxURI::Unescape(path); -#ifdef __WXMSW__ +#ifdef __WINDOWS__ // file urls either start with a forward slash (local harddisk), // otherwise they have a servername/sharename notation, // which only exists on msw and corresponds to a unc - if ( path[0u] == wxT('/') && path [1u] != wxT('/')) + if ( path.length() > 1 && (path[0u] == wxT('/') && path [1u] != wxT('/')) ) { path = path.Mid(1); }