From d4662e319ef81d5a2d59fe835560bc8d3db883f9 Mon Sep 17 00:00:00 2001 From: Florian Peters Date: Tue, 22 Oct 2024 14:06:53 +0100 Subject: [PATCH] Make filepath separator OS-independent in inclusion and exclusion lists checks This change fixes an issue with inclusion and exclusion lists not being taken into account correctly for directories on Windows machines due to a hard-coded separator character. --- sage/data_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sage/data_manager.py b/sage/data_manager.py index 8e48e1c..38231cd 100644 --- a/sage/data_manager.py +++ b/sage/data_manager.py @@ -159,7 +159,7 @@ def _should_include(self, file_path: str) -> bool: _, extension = os.path.splitext(file_path) extension = extension.lower() file_name = os.path.basename(file_path) - dirs = os.path.dirname(file_path).split("/") + dirs = os.path.dirname(file_path).split(os.sep) if self.inclusions: return (