From 5673fe0337713821da0ce4827af6811480ad563d Mon Sep 17 00:00:00 2001 From: phixxy Date: Thu, 5 Mar 2026 00:52:46 -0800 Subject: [PATCH] -l now states if .skratch is empty --- skratch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skratch.py b/skratch.py index a892bcd..64f01a8 100755 --- a/skratch.py +++ b/skratch.py @@ -12,7 +12,7 @@ def make_dir(d): def delete_all(d): if not os.path.exists(d): - print("Nothing to delete") + print("Skratch path doesn't exist") else: list_all(d) x = input("Delete the above files? y/N ") @@ -25,7 +25,9 @@ def delete_all(d): def list_all(d): if not os.path.exists(d): - print("Nothing to list") + print("Skratch path doesn't exist") + elif os.listdir(d) == []: + print("No skratch files exist") else: for file in os.listdir(d): print(file)