From 263eb013e4f1b769143b6a0566eccf7ee6dfdee4 Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Sun, 22 Oct 2023 12:36:16 +0200 Subject: [PATCH] fix error if destination arg is not provided --- DFGdocs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DFGdocs.py b/DFGdocs.py index fb9e397..a16d97e 100755 --- a/DFGdocs.py +++ b/DFGdocs.py @@ -52,7 +52,8 @@ class Template(): f.writelines(lines) def copy_files(self, destination, project_name): - dest = pathlib.Path(destination) + project_name = project_name.replace(" ", "_") + dest = pathlib.Path(destination).joinpath(project_name) if dest.exists() and dest.is_dir(): if len(list(dest.glob("*.*"))) > 0: raise ValueError(f"Destination folder ({str(dest.absolute())}) already exists and is not empty")