Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cycode/cli/utils/path_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ def get_relevant_files_in_path(path: str, exclude_patterns: Iterable[str]) -> Li


def is_sub_path(path: str, sub_path: str) -> bool:
common_path = os.path.commonpath([get_absolute_path(path), get_absolute_path(sub_path)])
return path == common_path
try:
common_path = os.path.commonpath([get_absolute_path(path), get_absolute_path(sub_path)])
return path == common_path
except ValueError:
# if paths are on the different drives
return False


def get_absolute_path(path: str) -> str:
Expand Down