From b46c0c25acea4fabe88d3206a404dc1c04e71e37 Mon Sep 17 00:00:00 2001 From: David Fejes Date: Thu, 18 Jun 2020 15:04:30 +0200 Subject: [PATCH] fixing capitalized drive letters in path on windows --- src/utils/file_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/file_utils.py b/src/utils/file_utils.py index df24f5ea..bc258645 100644 --- a/src/utils/file_utils.py +++ b/src/utils/file_utils.py @@ -142,6 +142,10 @@ def relative_path(path, parent_path): path = normalize_path(path) parent_path = normalize_path(parent_path) + if os_utils.is_win(): + path = path.capitalize() + parent_path = parent_path.capitalize() + if not path.startswith(parent_path): raise ValueError(path + ' is not subpath of ' + parent_path)