From 5b782dbd8ebf24aced2ab00574ed7a14d9fc596d Mon Sep 17 00:00:00 2001
From: VIGNET Pierre <pierre.vignet@irisa.fr>
Date: Fri, 6 Dec 2019 19:24:25 +0100
Subject: [PATCH] [cmd] Fix bug when a file is passed as a path: do not try to
 create it like a folder

---
 command_line/cadbiom_cmd/cadbiom_cmd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/command_line/cadbiom_cmd/cadbiom_cmd.py b/command_line/cadbiom_cmd/cadbiom_cmd.py
index 8380197..dcd7293 100644
--- a/command_line/cadbiom_cmd/cadbiom_cmd.py
+++ b/command_line/cadbiom_cmd/cadbiom_cmd.py
@@ -286,7 +286,7 @@ def ensure_dir_presence(path):
         # Current directory
         path = "."
 
-    if not os.path.isdir(path):
+    if not os.path.isfile(path) and not os.path.isdir(path):
         LOGGER.info("Creation of the directory <{}>".format(path))
         os.mkdir(path)
 
-- 
GitLab