From cd738bcff72630c5c57576a0993ef7d57dbd666d Mon Sep 17 00:00:00 2001 From: mere-human <9664141+mere-human@users.noreply.github.com> Date: Tue, 16 Mar 2021 23:00:10 +0200 Subject: [PATCH] Fix UNC path with quotes handling in folder & file Open/Save dialog Remove a workaround for double backslash that leads to problems. Originally, the double backslash workaround was needed to address #5368. But now, the app isn't stuck when such path is used, so the problem is gone. Fix #9582, close #9666 --- .../OpenSaveFileDialog/CustomFileDialog.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/PowerEditor/src/WinControls/OpenSaveFileDialog/CustomFileDialog.cpp b/PowerEditor/src/WinControls/OpenSaveFileDialog/CustomFileDialog.cpp index 93617a177..819823d84 100644 --- a/PowerEditor/src/WinControls/OpenSaveFileDialog/CustomFileDialog.cpp +++ b/PowerEditor/src/WinControls/OpenSaveFileDialog/CustomFileDialog.cpp @@ -391,18 +391,6 @@ private: return eq; }, '\\'); - // If there are two or more double backslash, then change it to single. - // Start from 2nd element to keep a path that starts from "\\". - auto last = std::unique(fileName.begin() + 1, fileName.end(), - [](generic_string::value_type a, generic_string::value_type b) - { - return a == b && a == '\\'; - }); - if (last != fileName.end()) - { - fileName.erase(last, fileName.end()); - transformed = true; - } return transformed; }