Skip to content

Bulk asynchronous downloader for multiple file hosts

prevent sorted directory from being download directory

datawhores8cb79554f404
diff --git a/cyberdrop_dl/utils/sorting.py b/cyberdrop_dl/utils/sorting.py
index 1d928ee17..78767da7f 100644
--- a/cyberdrop_dl/utils/sorting.py
+++ b/cyberdrop_dl/utils/sorting.py
@@ -77,6 +77,9 @@ class Sorter:
if self.download_dir in self.sorted_downloads.parents:
await log_with_color("Sort Directory cannot be in the Download Directory", "red", 40)
return True
+ elif self.download_dir == self.sorted_downloads:
+ await log_with_color("Sort Directory cannot be the Directory being scanned", "red", 40)
+ return True
return False
async def sort(self) -> None: