From 9696657f22ee2f10017c0bc305ae1843ee8fe768 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 28 Sep 2012 23:48:09 +0000 Subject: [PATCH] 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 --- src/common/filename.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.49.0