Skip to content

Commit

Permalink
Copy the files to their destination instead of removing the originals. (
Browse files Browse the repository at this point in the history
#113)

* copy the files to their destination instead of removing the originals

* bump version

Co-authored-by: François Leblanc <[email protected]>
  • Loading branch information
leblancfg and leblancfg authored Nov 1, 2020
1 parent c471432 commit 264319f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion autocrop/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__title__ = "autocrop"
__description__ = "Automatically crops faces from batches of pictures"
__author__ = "François Leblanc"
__version__ = "1.0.2"
__version__ = "1.1.0"
4 changes: 2 additions & 2 deletions autocrop/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def output(input_filename, output_filename, image):
cropped image data."""
if input_filename != output_filename:
# Move the file to the output directory
shutil.move(input_filename, output_filename)
shutil.copy(input_filename, output_filename)
# Encode the image as an in-memory PNG
img_new = Image.fromarray(image)
# Write the new image (converting the format to match the output
Expand All @@ -34,7 +34,7 @@ def reject(input_filename, reject_filename):
"""Move the input file to the reject location."""
if input_filename != reject_filename:
# Move the file to the reject directory
shutil.move(input_filename, reject_filename)
shutil.copy(input_filename, reject_filename)


def main(
Expand Down

0 comments on commit 264319f

Please sign in to comment.