mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Zip - When reading archives replace relative paths by underlines
(cherry picked from commit 344b0b786b)
This commit is contained in:
parent
43c39e03be
commit
3f2fcb350a
1 changed files with 11 additions and 0 deletions
|
|
@ -174,6 +174,17 @@ begin
|
|||
DoDirSeparators(Result);
|
||||
Result := ExcludeFrontPathDelimiter(Result);
|
||||
Result := ExcludeTrailingPathDelimiter(Result);
|
||||
while StrBegins(Result, '..' + PathDelim) do
|
||||
begin
|
||||
Result := Copy(Result, 4, MaxInt);
|
||||
Result := ExcludeFrontPathDelimiter(Result);
|
||||
end;
|
||||
if StrEnds(Result, PathDelim + '..') then
|
||||
begin
|
||||
Result[Length(Result)] := '_';
|
||||
Result[Length(Result) - 1] := '_';
|
||||
end;
|
||||
Result := StringReplace(Result, PathDelim + '..' + PathDelim, PathDelim + '__' + PathDelim, [rfReplaceAll]);
|
||||
end;
|
||||
|
||||
procedure TAbZipKit.DeleteDirectoriesRecursively(const Paths: String);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue