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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user