@@ -522,20 +522,25 @@ public function moveFromStorage(
522522 // - remove $this->copyBetweenStorage
523523
524524 if (!$ sourceStorage ->isDeletable ($ sourceInternalPath )) {
525+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath not deletable " . __FILE__ . ': ' . __LINE__ . "\n" ;
525526 return false ;
526527 }
527528
528529 $ result = $ this ->copyBetweenStorage ($ sourceStorage , $ sourceInternalPath , $ targetInternalPath , $ preserveMtime , true );
530+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath copy: $ result " . __FILE__ . ': ' . __LINE__ . "\n" ;
529531 if ($ result ) {
532+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath copy success " . __FILE__ . ': ' . __LINE__ . "\n" ;
530533 if ($ sourceStorage ->instanceOfStorage (ObjectStoreStorage::class)) {
531534 /** @var ObjectStoreStorage $sourceStorage */
532535 $ sourceStorage ->setPreserveCacheOnDelete (true );
533536 }
534537 try {
535538 if ($ sourceStorage ->is_dir ($ sourceInternalPath )) {
536539 $ result = $ sourceStorage ->rmdir ($ sourceInternalPath );
540+ echo "[DEBUG] $ sourceInternalPath rmdir: $ result " . __FILE__ . ': ' . __LINE__ . "\n" ;
537541 } else {
538542 $ result = $ sourceStorage ->unlink ($ sourceInternalPath );
543+ echo "[DEBUG] $ sourceInternalPath unlink: $ result " . __FILE__ . ': ' . __LINE__ . "\n" ;
539544 }
540545 } finally {
541546 if ($ sourceStorage ->instanceOfStorage (ObjectStoreStorage::class)) {
@@ -621,10 +626,12 @@ private function copyBetweenStorage(
621626 bool $ preserveMtime ,
622627 bool $ isRename ,
623628 ): bool {
629+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath $ isRename " . __FILE__ . ': ' . __LINE__ . "\n" ;
624630 // for versions we have nothing to do, because versions should always use the
625631 // key from the original file. Just create a 1:1 copy and done
626632 if ($ this ->isVersion ($ targetInternalPath ) ||
627633 $ this ->isVersion ($ sourceInternalPath )) {
634+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath $ isRename " . __FILE__ . ': ' . __LINE__ . "\n" ;
628635 // remember that we try to create a version so that we can detect it during
629636 // fopen($sourceInternalPath) and by-pass the encryption in order to
630637 // create a 1:1 copy of the file
@@ -642,6 +649,7 @@ private function copyBetweenStorage(
642649 }
643650 $ this ->updateEncryptedVersion ($ sourceStorage , $ sourceInternalPath , $ targetInternalPath , $ isRename , true );
644651 }
652+ echo "[DEBUG] $ result " . __FILE__ . ': ' . __LINE__ . "\n" ;
645653 return $ result ;
646654 }
647655
0 commit comments