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
This commit is contained in:
Vadim Zeitlin
2012-09-28 23:48:09 +00:00
parent 603e7f6d0c
commit 9696657f22

View File

@@ -642,7 +642,7 @@ bool wxFileSystemObjectExists(const wxString& path, int flags)
// we must use GetFileAttributes() instead of the ANSI C functions because // we must use GetFileAttributes() instead of the ANSI C functions because
// it can cope with network (UNC) paths unlike them // 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 ) if ( ret == INVALID_FILE_ATTRIBUTES )
return false; return false;