mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Tell user when the conflict resolver kept existing files
This commit is contained in:
parent
57259e21f4
commit
0f5e55648b
@ -141,6 +141,7 @@ class Organizer(Location):
|
|||||||
prompt = f"Overwrite file {dst_absolute}?"
|
prompt = f"Overwrite file {dst_absolute}?"
|
||||||
conflict = ConflictType.FILE_OVERWRITTEN
|
conflict = ConflictType.FILE_OVERWRITTEN
|
||||||
if not self._resolve_conflict(prompt, dst_absolute, conflict, default=True):
|
if not self._resolve_conflict(prompt, dst_absolute, conflict, default=True):
|
||||||
|
PRETTY.ignored_file(dst_absolute, "user conflict resolution")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
self.download_summary.add_modified_file(dst_absolute)
|
self.download_summary.add_modified_file(dst_absolute)
|
||||||
@ -203,6 +204,8 @@ class Organizer(Location):
|
|||||||
if self._resolve_conflict(prompt, path, ConflictType.FILE_DELETED, default=False):
|
if self._resolve_conflict(prompt, path, ConflictType.FILE_DELETED, default=False):
|
||||||
self.download_summary.add_deleted_file(path)
|
self.download_summary.add_deleted_file(path)
|
||||||
path.unlink()
|
path.unlink()
|
||||||
|
else:
|
||||||
|
PRETTY.ignored_file(path, "user conflict resolution")
|
||||||
|
|
||||||
def _resolve_conflict(
|
def _resolve_conflict(
|
||||||
self, prompt: str, path: Path, conflict: ConflictType, default: bool
|
self, prompt: str, path: Path, conflict: ConflictType, default: bool
|
||||||
|
Loading…
Reference in New Issue
Block a user