Skip to content

Commit e167366

Browse files
authored
Merge pull request #144 from cloudinary/hotfix/downsync
Ensure that the downloading process did not kickoff
2 parents 21c62ce + a58cb5c commit e167366

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/sync/class-push-sync.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ public function prepare_upload( $post, $push_sync = false ) {
542542
$suffix_data = wp_parse_args( $suffix_meta, $suffix_defaults );
543543

544544
// Prepare a uniqueness check and get a suffix if needed.
545-
if ( true === $push_sync && true !== $downsync ) {
545+
if ( true === $push_sync && true !== $downsync && empty( get_post_meta( $post->ID, Sync::META_KEYS['downloading'], true ) ) ) {
546546
if ( $public_id !== $suffix_data['public_id'] || empty( $suffix_data['suffix'] ) ) {
547547
$suffix_data['suffix'] = $this->sync->add_suffix_maybe( $public_id, $post->ID );
548548
if ( ! empty( $suffix_data['suffix'] ) ) {

0 commit comments

Comments
 (0)