Patch (to be ported)
Project:
CommerceML
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
7 Sep 2016 at 12:42 UTC
Updated:
14 Dec 2016 at 07:40 UTC
Jump to comment: Most recent, Most recent file
There was a need to move the import directory cleaning procedure from catalog import step to the authorization step.
Comments
Comment #3
sin commentedCommitted, thnx!
Comment #4
walkingdexter commentedBackported patch for Drupal 6.
Comment #5
walkingdexter commentedComment #7
sin commentedThe code was:
So _commerceml_clear_import_directory() was never called due to _commerceml_success() call to drupal_exit().
That is why only archive import worked. File by file import was broken due to clear never executed and files always appended.
I fixed it for 7.x swapping these two code lines.
Comment #8
sin commentedRight now the exchange may fail if file_unmanaged_delete_recursive() returns false, for example if it has no access to delete some files. So pls test before use on production sites.
Comment #9
sin commentedComment #10
sin commentedMoved cleanup to init stage with 'commerceml_need_clear_import_directory' flag check. The flag is set on successful import only.