From 49a7b8068081ef6aa7902e6da2ef9239c1744f01 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Fri, 11 Feb 2022 06:18:17 -0800 Subject: [PATCH] Fixed cleanup for #629 --- osxphotos/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osxphotos/cli.py b/osxphotos/cli.py index dbe4c381..a76c944b 100644 --- a/osxphotos/cli.py +++ b/osxphotos/cli.py @@ -2087,6 +2087,8 @@ def export( # cleanup files and do report if needed if cleanup: + db_file = str(pathlib.Path(export_db_path).resolve()) + db_files = [db_file, db_file + "-wal", db_file + "-shm"] all_files = ( results.exported + results.skipped @@ -2105,7 +2107,7 @@ def export( + results.missing # include files that have error in case they exist from previous export + [r[0] for r in results.error] - + [str(pathlib.Path(export_db_path).resolve())] + + db_files ) click.echo(f"Cleaning up {dest}") cleaned_files, cleaned_dirs = cleanup_files(dest, all_files, fileutil)