Skip to content

Commit b46c0c2

Browse files
committed
fixing capitalized drive letters in path on windows
1 parent b164c8b commit b46c0c2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/utils/file_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ def relative_path(path, parent_path):
142142
path = normalize_path(path)
143143
parent_path = normalize_path(parent_path)
144144

145+
if os_utils.is_win():
146+
path = path.capitalize()
147+
parent_path = parent_path.capitalize()
148+
145149
if not path.startswith(parent_path):
146150
raise ValueError(path + ' is not subpath of ' + parent_path)
147151

0 commit comments

Comments
 (0)