Skip to content

Commit

Permalink
fix calc_rel_path
Browse files Browse the repository at this point in the history
prepend a '.\' if base and child are in the same directory
  • Loading branch information
maxpat78 committed Aug 5, 2024
1 parent 3d035e3 commit ee7db50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion FATtools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ def calc_rel_path(base, child):
# returns base if they don't share anything
if not i: return base
n = len(child_parts) - 1 - i # counts path separators
relpath = ''
if n:
relpath = ''
else:
relpath = '.\\'
while n:
relpath += '..\\'
n -= 1
Expand Down
2 changes: 1 addition & 1 deletion FATtools/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.36'
__version__ = '1.0.37'

0 comments on commit ee7db50

Please sign in to comment.