Skip to content

Commit

Permalink
ovl: fix absolute path handling
Browse files Browse the repository at this point in the history
When both src and dst are absolute path, the current logic of handling
the intermediate path name (dst_root) is wrong due to root being an abs
path.
Thanks @housemeow for identifying this issue and attempt to fix it in PR
  • Loading branch information
aitjcize committed Mar 14, 2024
1 parent d995989 commit 104a804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/ovl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ def _push_single_target(src, dst):
# If dest_dir does not exist, the resulting directory structure should
# be:
# dest_dir/A
dst_root = root if dst_exists else root[len(src):].lstrip('/')
dst_root = os.path.basename(root) if dst_exists else ''
for name in files:
_push(os.path.join(root, name),
os.path.join(dst, dst_root, name))
Expand Down

0 comments on commit 104a804

Please sign in to comment.