From e5cc1056b9e2ab731dae47b309ef626dd14fd7a4 Mon Sep 17 00:00:00 2001 From: taynpg Date: Tue, 17 Dec 2024 08:20:38 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=AD=A3=E5=B8=A6'?= =?UTF-8?q?=E7=9A=84=E8=B7=AF=E5=BE=84=E4=B8=8D=E8=83=BD=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 7 ++++++- client/file_oper.cpp | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1c24258..e206bc6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -125,6 +125,11 @@ "queue": "cpp", "resumable": "cpp", "numeric": "cpp", - "set": "cpp" + "set": "cpp", + "*.tcc": "cpp", + "cwctype": "cpp", + "memory_resource": "cpp", + "random": "cpp", + "cinttypes": "cpp" } } \ No newline at end of file diff --git a/client/file_oper.cpp b/client/file_oper.cpp index 34a86d8..bb52722 100644 --- a/client/file_oper.cpp +++ b/client/file_oper.cpp @@ -20,9 +20,15 @@ std::vector CFileOpr::get_file_list(const std::string& input) auto vec = COfStr::split(backup, "|"); for (const auto& item : vec) { std::string ret(item); +#ifdef _WIN32 if (item.find("\"") != std::string::npos) { ret = COfStr::replace(item, "\"", ""); } +#else + if (item.find(R"(')") != std::string::npos) { + ret = COfStr::replace(item, R"(')", ""); + } +#endif result.push_back(COfPath::to_full(ret)); } return result;