From b2c5d304f85d270a53a6ce8a5f389bdc6825744c Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 10 Apr 2021 11:14:37 +0200 Subject: [PATCH] Improved path and name handling in new command --- src/cpl_cli/source_creator/console_builder.py | 2 +- src/cpl_cli/source_creator/library_builder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpl_cli/source_creator/console_builder.py b/src/cpl_cli/source_creator/console_builder.py index e0958e28..5ac7baf6 100644 --- a/src/cpl_cli/source_creator/console_builder.py +++ b/src/cpl_cli/source_creator/console_builder.py @@ -132,7 +132,7 @@ class ConsoleBuilder: for template in templates: divider = '' - if not template.path.endswith('/'): + if template.path != '' and not template.path.endswith('/'): divider = '/' Console.spinner( diff --git a/src/cpl_cli/source_creator/library_builder.py b/src/cpl_cli/source_creator/library_builder.py index 1c1ce63b..08e1e660 100644 --- a/src/cpl_cli/source_creator/library_builder.py +++ b/src/cpl_cli/source_creator/library_builder.py @@ -132,7 +132,7 @@ class LibraryBuilder: for template in templates: divider = '' - if not template.path.endswith('/'): + if template.path != '' and not template.path.endswith('/'): divider = '/' Console.spinner(