From 8c9789d401392f6329c1a649ae97211b82e8252d Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Fri, 1 Nov 2024 01:28:30 +0200 Subject: [PATCH] Make sure that subfolders array is correct --- NiChart_DLMUSE/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NiChart_DLMUSE/utils.py b/NiChart_DLMUSE/utils.py index f23825c..477dfe7 100644 --- a/NiChart_DLMUSE/utils.py +++ b/NiChart_DLMUSE/utils.py @@ -176,6 +176,9 @@ def split_data(in_dir: str, N: int) -> list: os.system(f"cp {file} {in_dir}/split_{current_folder}") current_file += 1 + if current_file > 0: + subfolders.append(f"{in_dir}/split_{current_folder}") + return subfolders