Revision | 29530 (tree) |
---|---|
Time | 2023-02-28 04:07:08 |
Author | ![]() |
It doesn't make sense to call GetFullPathName (called by CPathUtils::GetLongPathname) on an asterisk separate path. Remove the call, as it is anyway called by LoadFromAsteriskSeparatedString.
This would mean cmdLinePath has to call GetLongPathname, but we can simplify it by just getting the first path from the pathList.
Solves a problem with multiple levels of ..\ in an asteriskseparated string:
https://groups.google.com/g/tortoisesvn/c/Q1uzJ3j7J-4
@@ -1,6 +1,6 @@ | ||
1 | 1 | // TortoiseSVN - a Windows shell extension for easy version control |
2 | 2 | |
3 | -// Copyright (C) 2003-2018, 2020-2022 - TortoiseSVN | |
3 | +// Copyright (C) 2003-2018, 2020-2023 - TortoiseSVN | |
4 | 4 | |
5 | 5 | // This program is free software; you can redistribute it and/or |
6 | 6 | // modify it under the terms of the GNU General Public License |
@@ -353,7 +353,7 @@ | ||
353 | 353 | } |
354 | 354 | else |
355 | 355 | { |
356 | - CString sPathArgument = CPathUtils::GetLongPathname(parser.GetVal(L"path")).c_str(); | |
356 | + CString sPathArgument = parser.GetVal(L"path"); | |
357 | 357 | if (parser.HasKey(L"expaths")) |
358 | 358 | { |
359 | 359 | // an /expaths param means we're started via the buttons in our Win7 library |
@@ -395,9 +395,9 @@ | ||
395 | 395 | TaskDialog(GetExplorerHWND(), AfxGetResourceHandle(), MAKEINTRESOURCE(IDS_APPNAME), MAKEINTRESOURCE(IDS_INVALIDPARAMS), MAKEINTRESOURCE(IDS_ERR_NOPATH), TDCBF_OK_BUTTON, TD_ERROR_ICON, nullptr); |
396 | 396 | return FALSE; |
397 | 397 | } |
398 | - int asterisk = sPathArgument.Find('*'); | |
399 | - cmdLinePath.SetFromUnknown(asterisk >= 0 ? sPathArgument.Left(asterisk) : sPathArgument); | |
400 | 398 | pathList.LoadFromAsteriskSeparatedString(sPathArgument); |
399 | + if (pathList.GetCount()) | |
400 | + cmdLinePath = pathList[0]; | |
401 | 401 | } |
402 | 402 | if (g_sGroupingUuid.IsEmpty() && !cmdLinePath.IsEmpty()) |
403 | 403 | { |