|
|
@ -8,7 +8,7 @@ import json |
|
|
|
|
|
|
|
from . import version as transpose_version |
|
|
|
from .exceptions import TransposeError |
|
|
|
from .utils import move, remove, symlink |
|
|
|
from .utils import move, symlink |
|
|
|
|
|
|
|
|
|
|
|
@dataclass |
|
|
@ -162,9 +162,7 @@ class Transpose: |
|
|
|
|
|
|
|
entry_path = Path(self.config.entries[name].path) |
|
|
|
if entry_path.exists(): |
|
|
|
if entry_path.is_symlink(): |
|
|
|
remove(entry_path) |
|
|
|
elif force: # Backup the existing path |
|
|
|
if force: # Backup the existing path |
|
|
|
move(entry_path, entry_path.with_suffix(".backup")) |
|
|
|
else: |
|
|
|
raise TransposeError( |
|
|
@ -192,9 +190,7 @@ class Transpose: |
|
|
|
|
|
|
|
entry_path = Path(self.config.entries[name].path) |
|
|
|
if entry_path.exists(): |
|
|
|
if entry_path.is_symlink(): |
|
|
|
remove(entry_path) |
|
|
|
elif force: # Backup the existing path |
|
|
|
if force: # Backup the existing path |
|
|
|
move(entry_path, entry_path.with_suffix(".backup")) |
|
|
|
else: |
|
|
|
raise TransposeError( |
|
|
|