diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-04-16 11:02:50 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-04-16 11:02:50 +0200 |
commit | 273719f6203e0e6dae0514bcfe3caa44b881db9a (patch) | |
tree | 5ecbba66f626069a6900dcb7e7f43ad11a5f4e33 | |
parent | da23ab0dd6737dcd615c8b3e7e773211fc43188c (diff) | |
parent | 6e041088b8b9002a6e101808fabdedde6b6be388 (diff) | |
download | nextcloud-server-273719f6203e0e6dae0514bcfe3caa44b881db9a.tar.gz nextcloud-server-273719f6203e0e6dae0514bcfe3caa44b881db9a.zip |
Merge pull request #15666 from owncloud/revert-15572-stable8-shares-properlyformatmountpoint
Revert "[stable8] Properly add trailing slash to mount point"
-rw-r--r-- | apps/files_sharing/tests/sharedmount.php | 12 | ||||
-rw-r--r-- | lib/private/files/mount/mountpoint.php | 4 | ||||
-rw-r--r-- | tests/lib/files/mount/mountpoint.php | 4 |
3 files changed, 4 insertions, 16 deletions
diff --git a/apps/files_sharing/tests/sharedmount.php b/apps/files_sharing/tests/sharedmount.php index 33fee2bd03e..715c22cf4ae 100644 --- a/apps/files_sharing/tests/sharedmount.php +++ b/apps/files_sharing/tests/sharedmount.php @@ -141,20 +141,14 @@ class Test_Files_Sharing_Mount extends OCA\Files_sharing\Tests\TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER2); - \OC\Files\Filesystem::rename($this->filename, $this->filename . '_renamed'); + \OC\Files\Filesystem::rename($this->filename, "newFileName"); - $this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename . '_renamed')); + $this->assertTrue(\OC\Files\Filesystem::file_exists('newFileName')); $this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename)); self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename)); - $this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename . '_renamed')); - - // rename back to original name - self::loginHelper(self::TEST_FILES_SHARING_API_USER2); - \OC\Files\Filesystem::rename($this->filename . '_renamed', $this->filename); - $this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename . '_renamed')); - $this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename)); + $this->assertFalse(\OC\Files\Filesystem::file_exists("newFileName")); //cleanup \OCP\Share::unshare('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2); diff --git a/lib/private/files/mount/mountpoint.php b/lib/private/files/mount/mountpoint.php index b62dc478015..85edb7cb570 100644 --- a/lib/private/files/mount/mountpoint.php +++ b/lib/private/files/mount/mountpoint.php @@ -95,12 +95,10 @@ class MountPoint implements IMountPoint { } /** - * Sets the mount point path, relative to data/ - * * @param string $mountPoint new mount point */ public function setMountPoint($mountPoint) { - $this->mountPoint = $this->formatPath($mountPoint); + $this->mountPoint = $mountPoint; } /** diff --git a/tests/lib/files/mount/mountpoint.php b/tests/lib/files/mount/mountpoint.php index 29610e6058d..5a9c6de3e0a 100644 --- a/tests/lib/files/mount/mountpoint.php +++ b/tests/lib/files/mount/mountpoint.php @@ -31,10 +31,6 @@ class MountPoint extends \Test\TestCase { $this->assertEquals($storage, $mountPoint->getStorage()); $this->assertEquals(123, $mountPoint->getStorageId()); - $this->assertEquals('/mountpoint/', $mountPoint->getMountPoint()); - - $mountPoint->setMountPoint('another'); - $this->assertEquals('/another/', $mountPoint->getMountPoint()); } public function testInvalidStorage() { |