Skip to main content

fix a pluralisation bug in emptydir

ID
4840a41
date
2022-10-02 18:03:24+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
a3f0cce
message
fix a pluralisation bug in emptydir
changed files
1 file, 3 additions, 1 deletion

Changed files

emptydir (1267) → emptydir (1362)

diff --git a/emptydir b/emptydir
index eb0f132..6a303aa 100755
--- a/emptydir
+++ b/emptydir
@@ -44,7 +44,9 @@ if __name__ == "__main__":
             delete_directory(d)
             total_deleted += 1
 
-    if total_deleted > 0:
+    if total_deleted == 1:
+        print(termcolor.colored(f"1 directory deleted", "green"))
+    elif total_deleted > 0:
         print(
             termcolor.colored(
                 f"{humanize.intcomma(total_deleted)} directories deleted", "green"