From: Vadim Zeitlin Date: Fri, 28 Sep 2012 23:48:09 +0000 (+0000) Subject: Fix testing for existence of paths with trailing separators in wxMSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9696657f22ee2f10017c0bc305ae1843ee8fe768 Fix testing for existence of paths with trailing separators in wxMSW. We removed the trailing separators, that prevented GetFileAttributes() from working correctly, from the path but then didn't pass the modified path to it but the original one. Fix this and do use the updated path. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 9d712ce670..f4d4beb7ad 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -642,7 +642,7 @@ bool wxFileSystemObjectExists(const wxString& path, int flags) // we must use GetFileAttributes() instead of the ANSI C functions because // it can cope with network (UNC) paths unlike them - DWORD ret = ::GetFileAttributes(path.t_str()); + DWORD ret = ::GetFileAttributes(strPath.t_str()); if ( ret == INVALID_FILE_ATTRIBUTES ) return false;