Skip to content

Commit

Permalink
move-by-label: ignore empty base path
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsh committed Feb 10, 2024
1 parent 50d0c55 commit 756fffd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xirvik/commands/move_by_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ def maybe_lower(x: str) -> str:
return x

def bpc(info: TorrentInfo) -> bool:
return (not info.base_path.startswith(f'{PREFIX.format(completed_dir)}'
f'/{maybe_lower(info.custom1 or "")}')
return (info.base_path.strip()
and not info.base_path.startswith(f'{PREFIX.format(completed_dir)}'
f'/{maybe_lower(info.custom1 or "")}')
# Old style paths
and not info.base_path.startswith(f'/torrents/{username}/'))

Expand Down

0 comments on commit 756fffd

Please sign in to comment.