summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-02-16 03:27:50 +0100
committerRobin Appelman <icewind@owncloud.com>2013-02-16 03:27:50 +0100
commitd96146a017bd8f7e4573e4555cea2c198fa9fbad (patch)
treeeae31f519b93924a484d2e3f0e4843c95e95cb5d /apps/files_external
parent425d41aaf93e1cd3a44ddc794414683e8e2c4648 (diff)
downloadnextcloud-server-d96146a017bd8f7e4573e4555cea2c198fa9fbad.tar.gz
nextcloud-server-d96146a017bd8f7e4573e4555cea2c198fa9fbad.zip
Give storage backends the option to define having no known free space
When this is the case only the configured max upload size is taking into account for uploading
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/amazons3.php5
-rw-r--r--apps/files_external/lib/sftp.php4
-rw-r--r--apps/files_external/lib/streamwrapper.php4
-rw-r--r--apps/files_external/lib/swift.php4
-rw-r--r--apps/files_external/lib/webdav.php2
5 files changed, 1 insertions, 18 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 494885a1dd3..37e53a3a670 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -229,11 +229,6 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return false;
}
- public function free_space($path) {
- // Infinite?
- return false;
- }
-
public function touch($path, $mtime = null) {
if (is_null($mtime)) {
$mtime = time();
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index 551a5a64ef2..77c08d3b733 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -241,10 +241,6 @@ class SFTP extends \OC\Files\Storage\Common {
}
}
- public function free_space($path) {
- return -1;
- }
-
public function touch($path, $mtime=null) {
try {
if (!is_null($mtime)) return false;
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index a631e7ce06a..4685877f26b 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -76,10 +76,6 @@ abstract class StreamWrapper extends \OC\Files\Storage\Common{
return fopen($this->constructUrl($path), $mode);
}
- public function free_space($path) {
- return 0;
- }
-
public function touch($path, $mtime=null) {
$this->init();
if(is_null($mtime)) {
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index 0fd6fa143b8..a00316c1f84 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -478,10 +478,6 @@ class SWIFT extends \OC\Files\Storage\Common{
}
}
- public function free_space($path) {
- return 1024*1024*1024*8;
- }
-
public function touch($path, $mtime=null) {
$this->init();
$obj=$this->getObject($path);
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 039a07b1ef2..91cc22779e6 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -222,7 +222,7 @@ class DAV extends \OC\Files\Storage\Common{
return 0;
}
} catch(\Exception $e) {
- return 0;
+ return \OC\Files\FREE_SPACE_UNKNOWN;
}
}