mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 11:01:45 +00:00
Fix pivot path on Windows
This was causing a compare of template files to remove the existing dotfiles at the destinations.
This commit is contained in:
@@ -654,7 +654,10 @@ def pivot_path(path, newdir, striphome=False, logger=None):
|
||||
logger.dbg(f'strip home: {striphome}')
|
||||
if striphome:
|
||||
path = strip_home(path)
|
||||
sub = path.lstrip(os.sep)
|
||||
|
||||
# Account for Windows paths
|
||||
sub = path.lstrip(PurePath(path).anchor)
|
||||
|
||||
new = os.path.join(newdir, sub)
|
||||
if logger:
|
||||
logger.dbg(f'pivot \"{path}\" to \"{new}\"')
|
||||
|
||||
Reference in New Issue
Block a user