X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..9d98c19792465f5c01b9c156899079fb65bcc993:/src/common/filesys.cpp?ds=sidebyside 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); }