diff --git a/src/download/gallery_clean.py b/src/download/gallery_clean.py index 3ab06f1..db2ab5f 100644 --- a/src/download/gallery_clean.py +++ b/src/download/gallery_clean.py @@ -25,7 +25,8 @@ def _resolve_folder(user: User, handle: str | None) -> Path | None: base = user.directories.get("download") if base is None: return None - base = base / "x.com" + if not base.exists(): + return None if not handle: return base candidates = [ @@ -34,7 +35,7 @@ def _resolve_folder(user: User, handle: str | None) -> Path | None: for cand in candidates: if cand.exists(): return cand - return base + return None def _open_folder(path: Path) -> None: