aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-11-26 04:40:25 -0800
committerMorris Jobke <morris.jobke@gmail.com>2013-11-26 04:40:25 -0800
commit5cb1ce4a282cea5d4c0a8615e6ff61f65b2cc7d4 (patch)
tree7eddf532feb766f4e79f1c12c544f40cc4dc15a5
parentdc67c7efa9ff20f8b4466e5b6490405439d4a90f (diff)
parent712b47757af04d6c62fd8da222aa197c23363678 (diff)
downloadnextcloud-server-5cb1ce4a282cea5d4c0a8615e6ff61f65b2cc7d4.tar.gz
nextcloud-server-5cb1ce4a282cea5d4c0a8615e6ff61f65b2cc7d4.zip
Merge pull request #6057 from owncloud/extstorage-touchoperation
Return true when touch succeeds
-rw-r--r--apps/files_external/lib/streamwrapper.php1
-rw-r--r--apps/files_external/tests/smb.php5
-rw-r--r--tests/lib/files/storage/storage.php3
3 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index 23c5f91a2f3..aa42cbde828 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -68,6 +68,7 @@ abstract class StreamWrapper extends Common {
}
} else {
$this->file_put_contents($path, '');
+ return true;
}
}
diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php
index 0291f293fa6..199e35af676 100644
--- a/apps/files_external/tests/smb.php
+++ b/apps/files_external/tests/smb.php
@@ -29,6 +29,11 @@ class SMB extends Storage {
}
}
+ public function directoryProvider() {
+ // doesn't support leading/trailing spaces
+ return array(array('folder'));
+ }
+
public function testRenameWithSpaces() {
$this->instance->mkdir('with spaces');
$result = $this->instance->rename('with spaces', 'foo bar');
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 6c433e95475..5b5b8556859 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -236,7 +236,8 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
public function testTouchCreateFile() {
$this->assertFalse($this->instance->file_exists('foo'));
- $this->instance->touch('foo');
+ // returns true on success
+ $this->assertTrue($this->instance->touch('foo'));
$this->assertTrue($this->instance->file_exists('foo'));
}