From dcfb24bea5a8049d6f859609e97c774008b07348 Mon Sep 17 00:00:00 2001 From: Remi Cresson <remi.cresson@irstea.fr> Date: Thu, 2 Jun 2022 13:12:06 +0200 Subject: [PATCH] FIX: remove pathify() --- decloud/core/system.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/decloud/core/system.py b/decloud/core/system.py index 8114052..0b9f475 100644 --- a/decloud/core/system.py +++ b/decloud/core/system.py @@ -84,16 +84,7 @@ def get_files(directory, ext=None): def new_bname(filename, suffix): """ return a new basename (without path, without extension, + suffix) """ - filename = filename[filename.rfind("/"):] - filename = filename[:filename.rfind(".")] - return filename + "_" + suffix - - -def pathify(pth): - """ Adds posix separator if needed """ - if not pth.endswith("/"): - pth += "/" - return pth + return pathlib.Path(filename).stem + "_" + suffix def mkdir(pth): -- GitLab