Skip to content

Commit

Permalink
fix: wrong path difference
Browse files Browse the repository at this point in the history
  • Loading branch information
Yazawazi committed Oct 27, 2023
1 parent eb606a1 commit 9b8ac8c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions backend/funix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,7 @@ def get_path_difference(base_dir: str, target_dir: str) -> str | None:
if not target_dir.startswith(base_dir):
raise ValueError("The base directory is not a prefix of the target directory.")

if base_components == target_components:
return None

path_diff = []
for i in range(len(base_components) - 1, len(target_components)):
path_diff.append(target_components[i])

if not path_diff:
return None
path_diff = target_components

for _ in range(len(base_components)):
path_diff.pop(0)
Expand Down

0 comments on commit 9b8ac8c

Please sign in to comment.