Commit edb60c79 authored by Arnaud Fontaine's avatar Arnaud Fontaine

When migrating a Document to ZODB, make sure it is removed on the filesystem if there was no error.

parent 24162a72
......@@ -3657,9 +3657,11 @@ class FilesystemToZodbTemplateItem(FilesystemDocumentTemplateItem,
filesystem_path,
filesystem_file,
class_id).aq_base
finally:
filesystem_file.close()
# Delete the file only if there was no error encountered during
# migration
os.remove(filesystem_path)
# Update 'migrate_object_dict' with the new path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment