]> source.dussan.org Git - nextcloud-server.git/commitdiff
added method needsPartFile() in Storage 3600/head
authorVinicius Cubas Brand <viniciuscb@gmail.com>
Thu, 23 Feb 2017 16:32:16 +0000 (13:32 -0300)
committerVinicius Cubas Brand <viniciuscb@gmail.com>
Tue, 14 Mar 2017 13:06:50 +0000 (10:06 -0300)
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
apps/dav/lib/Connector/Sabre/File.php
lib/private/Files/Storage/Common.php
lib/private/Files/Storage/Wrapper/Wrapper.php
lib/public/Files/Storage.php

index d0826ee5a8c8cd0c6043a84efbf03007f45b40cf..0e535314c2e8bbdf63c64a07410e217e6f067372 100644 (file)
@@ -505,9 +505,9 @@ class File extends Node implements IFile {
         */
        private function needsPartFile($storage) {
                // TODO: in the future use ChunkHandler provided by storage
-               // and/or add method on Storage called "needsPartFile()"
                return !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') &&
-               !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud');
+                       !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud') &&
+                       $storage->needsPartFile();
        }
 
        /**
index 5561f6a889b8b359d7c93d658b5641c94503c326..e317682836435bfd85a890bef926634a71aa4b4d 100644 (file)
@@ -711,4 +711,11 @@ abstract class Common implements Storage, ILockingStorage {
        public function setAvailability($isAvailable) {
                $this->getStorageCache()->setAvailability($isAvailable);
        }
+
+       /**
+        * @return bool
+        */
+       public function needsPartFile() {
+               return true;
+       }
 }
index 71b64d8c82c00d980022a516835dba500b539837..d7cd4b729dbfd40cddf622fcce7f70c185ce3e93 100644 (file)
@@ -610,4 +610,11 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage {
                        $this->getWrapperStorage()->changeLock($path, $type, $provider);
                }
        }
+
+       /**
+        * @return bool
+        */
+       public function needsPartFile() {
+               return $this->getWrapperStorage()->needsPartFile();
+       }
 }
index cf67879908c19898e45d0d9fa64277e189ed8bb8..ac1872591fa96056b7702dda741f6fb0253ec8af 100644 (file)
@@ -457,4 +457,6 @@ interface Storage extends IStorage {
         * @param bool $isAvailable
         */
        public function setAvailability($isAvailable);
+
+       public function needsPartFile();
 }