@@ -169,8 +169,11 @@ public function file_put_contents(string $path, mixed $data): int|float|false {
169169 }
170170
171171 public function unlink (string $ path ): bool {
172+ echo "[DEBUG] unlink( $ path) " . __FILE__ . ': ' . __LINE__ . "\n" ;
172173 $ fullPath = $ this ->getFullPath ($ path );
174+ echo "[DEBUG] unlink( $ fullPath) " . __FILE__ . ': ' . __LINE__ . "\n" ;
173175 if ($ this ->util ->isExcluded ($ fullPath )) {
176+ echo "[DEBUG] excluded $ fullPath " . __FILE__ . ': ' . __LINE__ . "\n" ;
174177 return $ this ->storage ->unlink ($ path );
175178 }
176179
@@ -522,20 +525,25 @@ public function moveFromStorage(
522525 // - remove $this->copyBetweenStorage
523526
524527 if (!$ sourceStorage ->isDeletable ($ sourceInternalPath )) {
528+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath not deletable " . __FILE__ . ': ' . __LINE__ . "\n" ;
525529 return false ;
526530 }
527531
528532 $ result = $ this ->copyBetweenStorage ($ sourceStorage , $ sourceInternalPath , $ targetInternalPath , $ preserveMtime , true );
533+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath copy: $ result " . __FILE__ . ': ' . __LINE__ . "\n" ;
529534 if ($ result ) {
535+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath copy success " . __FILE__ . ': ' . __LINE__ . "\n" ;
530536 if ($ sourceStorage ->instanceOfStorage (ObjectStoreStorage::class)) {
531537 /** @var ObjectStoreStorage $sourceStorage */
532538 $ sourceStorage ->setPreserveCacheOnDelete (true );
533539 }
534540 try {
535541 if ($ sourceStorage ->is_dir ($ sourceInternalPath )) {
536542 $ result = $ sourceStorage ->rmdir ($ sourceInternalPath );
543+ echo "[DEBUG] $ sourceInternalPath rmdir: $ result " . __FILE__ . ': ' . __LINE__ . "\n" ;
537544 } else {
538545 $ result = $ sourceStorage ->unlink ($ sourceInternalPath );
546+ echo "[DEBUG] $ sourceInternalPath unlink: $ result " . __FILE__ . ': ' . __LINE__ . "\n" ;
539547 }
540548 } finally {
541549 if ($ sourceStorage ->instanceOfStorage (ObjectStoreStorage::class)) {
@@ -621,10 +629,12 @@ private function copyBetweenStorage(
621629 bool $ preserveMtime ,
622630 bool $ isRename ,
623631 ): bool {
632+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath $ isRename " . __FILE__ . ': ' . __LINE__ . "\n" ;
624633 // for versions we have nothing to do, because versions should always use the
625634 // key from the original file. Just create a 1:1 copy and done
626635 if ($ this ->isVersion ($ targetInternalPath ) ||
627636 $ this ->isVersion ($ sourceInternalPath )) {
637+ echo "[DEBUG] $ sourceInternalPath $ targetInternalPath $ isRename " . __FILE__ . ': ' . __LINE__ . "\n" ;
628638 // remember that we try to create a version so that we can detect it during
629639 // fopen($sourceInternalPath) and by-pass the encryption in order to
630640 // create a 1:1 copy of the file
@@ -642,6 +652,7 @@ private function copyBetweenStorage(
642652 }
643653 $ this ->updateEncryptedVersion ($ sourceStorage , $ sourceInternalPath , $ targetInternalPath , $ isRename , true );
644654 }
655+ echo "[DEBUG] $ result " . __FILE__ . ': ' . __LINE__ . "\n" ;
645656 return $ result ;
646657 }
647658
0 commit comments