From a58cb5ca3845280ae648d953bdae6be485442b4a Mon Sep 17 00:00:00 2001 From: Marco Pereirinha Date: Thu, 30 Jul 2020 11:25:01 +0100 Subject: [PATCH] Ensure that the downloading process did not kickoff --- .../php/sync/class-push-sync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/sync/class-push-sync.php b/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/sync/class-push-sync.php index c7033c533..7a3079394 100644 --- a/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/sync/class-push-sync.php +++ b/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/sync/class-push-sync.php @@ -542,7 +542,7 @@ public function prepare_upload( $post, $push_sync = false ) { $suffix_data = wp_parse_args( $suffix_meta, $suffix_defaults ); // Prepare a uniqueness check and get a suffix if needed. - if ( true === $push_sync && true !== $downsync ) { + if ( true === $push_sync && true !== $downsync && empty( get_post_meta( $post->ID, Sync::META_KEYS['downloading'], true ) ) ) { if ( $public_id !== $suffix_data['public_id'] || empty( $suffix_data['suffix'] ) ) { $suffix_data['suffix'] = $this->sync->add_suffix_maybe( $public_id, $post->ID ); if ( ! empty( $suffix_data['suffix'] ) ) {