From 72003018b64564a566c7984a18f902f9f21d3aae Mon Sep 17 00:00:00 2001 From: James Turk Date: Sat, 27 Jul 2024 03:10:25 -0400 Subject: [PATCH] fix no dir bug --- src/maddog/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/maddog/app.py b/src/maddog/app.py index b8315db..4727647 100644 --- a/src/maddog/app.py +++ b/src/maddog/app.py @@ -31,9 +31,12 @@ TODO_TODO_RE = re.compile( def get_files(dirname): + print(dirname, not dirname) if not dirname: dirname = "~/wiki/" - p = pathlib.Path(dirname[0]).expanduser() + else: + dirname = dirname[0] + p = pathlib.Path(dirname).expanduser() return p.rglob("*.md")