Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '7zip/UI/Common/ExtractingFilePath.cpp')
-rwxr-xr-x7zip/UI/Common/ExtractingFilePath.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/7zip/UI/Common/ExtractingFilePath.cpp b/7zip/UI/Common/ExtractingFilePath.cpp
index b1a6d876..a0b17282 100755
--- a/7zip/UI/Common/ExtractingFilePath.cpp
+++ b/7zip/UI/Common/ExtractingFilePath.cpp
@@ -41,14 +41,20 @@ UString GetCorrectPath(const UString &path)
break;
while(result.Length() > first)
{
- if (result[first] == L'\\' || result[first] == L'/')
+ if (
+ #ifdef _WIN32
+ result[first] == L'\\' ||
+ #endif
+ result[first] == L'/')
{
result.Delete(first);
continue;
}
break;
}
+ #ifdef _WIN32
result.Replace(L"..\\", L"");
+ #endif
result.Replace(L"../", L"");
ReplaceDisk(result);