]> source.dussan.org Git - nextcloud-server.git/commitdiff
disable proxys before copying files to the trash bin
authorBjörn Schießle <schiessle@owncloud.com>
Fri, 3 May 2013 13:18:05 +0000 (15:18 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Fri, 3 May 2013 13:18:05 +0000 (15:18 +0200)
apps/files_trashbin/lib/trash.php

index 221c32f553d684e24a5ad9eff78c59b9e8f32127..661d5f7bba41d18e92f69e354ab6663dd3d60bd1 100644 (file)
@@ -73,8 +73,12 @@ class Trashbin {
                if ( $trashbinSize === false || $trashbinSize < 0 ) {
                        $trashbinSize = self::calculateSize(new \OC\Files\View('/'. $user.'/files_trashbin'));
                }
-               
+
+               // disable proxy to prevent recursive calls
+               $proxyStatus = \OC_FileProxy::$enabled;
+               \OC_FileProxy::$enabled = false;
                $sizeOfAddedFiles = self::copy_recursive($file_path, 'files_trashbin/files/'.$filename.'.d'.$timestamp, $view);
+               \OC_FileProxy::$enabled = $proxyStatus;
 
                if ( $view->file_exists('files_trashbin/files/'.$filename.'.d'.$timestamp) ) {
                        $trashbinSize += $sizeOfAddedFiles;