]> git.treefish.org Git - photosort.git/blobdiff - src/photosort.py
implemented cleanup
[photosort.git] / src / photosort.py
index 38bea1b3bdf29f795b620a0b3d445a9fc049b600..4c4149ef81def8f810b93aec124ad4aa09778a95 100755 (executable)
@@ -46,3 +46,6 @@ for src_file_name, src_file_path in misc.walk_media_files(args.SOURCE_DIR):
         dst_time = misc.extract_timestamp(dst_file_path)
         if src_time > dst_time:
             misc.import_file(src_file_path, dst_file_path, move=args.cleanup)
+
+if args.cleanup:
+    misc.delete_dir_contents(args.SOURCE_DIR)