Skip to content

Commit

Permalink
[path] leave '..' segments as is (#5728)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Aug 1, 2024
1 parent 0432e05 commit 1bdb0f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gallery_dl/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def build_directory(self, kwdict):
try:
for fmt in self.directory_formatters:
segment = fmt(kwdict).strip()
if strip:
if strip and segment != "..":
# remove trailing dots and spaces (#647)
segment = segment.rstrip(strip)
if segment:
Expand All @@ -289,7 +289,7 @@ def build_directory_conditional(self, kwdict):
formatters = self.directory_formatters
for fmt in formatters:
segment = fmt(kwdict).strip()
if strip:
if strip and segment != "..":
segment = segment.rstrip(strip)
if segment:
append(self.clean_segment(segment))
Expand Down

0 comments on commit 1bdb0f7

Please sign in to comment.