mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 17:20:05 +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}')
|
logger.dbg(f'strip home: {striphome}')
|
||||||
if striphome:
|
if striphome:
|
||||||
path = strip_home(path)
|
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)
|
new = os.path.join(newdir, sub)
|
||||||
if logger:
|
if logger:
|
||||||
logger.dbg(f'pivot \"{path}\" to \"{new}\"')
|
logger.dbg(f'pivot \"{path}\" to \"{new}\"')
|
||||||
|
|||||||
Reference in New Issue
Block a user