Skip to content

Commit

Permalink
commands.identify:identify_original_file - add output when a file is …
Browse files Browse the repository at this point in the history
…skipped because it exists, and it is not an update operation
  • Loading branch information
MatteoCampinoti94 committed Jan 16, 2025
1 parent 0c601ee commit 313a452
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions digiarch/commands/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,16 @@ def identify_original_file(
]

if existing_file and not update:
Event.from_command(ctx, "skip", (existing_file.uuid, "original"), reason="exists").log(
INFO,
*loggers,
path=existing_file.relative_path,
)
return
if existing_file and existing_file.lock and not ignore_lock:
Event.from_command(ctx, "skip", (existing_file.uuid, "original")).log(
Event.from_command(ctx, "skip", (existing_file.uuid, "original"), reason="locked").log(
INFO,
*loggers,
locked=True,
path=existing_file.relative_path,
)
return
Expand Down

0 comments on commit 313a452

Please sign in to comment.