diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-22 14:29:23 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-22 14:31:22 +0200 |
commit | 11aa2cf74b813800cae5fdee426ed83196a34139 (patch) | |
tree | c2b2d99b67a8e4130c2ff18b6487e2d5f3aebfc0 | |
parent | 1166d62d9be783cb56e0bd8fbfc016447bdbdda4 (diff) | |
download | nextcloud-server-11aa2cf74b813800cae5fdee426ed83196a34139.tar.gz nextcloud-server-11aa2cf74b813800cae5fdee426ed83196a34139.zip |
always check for unique filename, if a file gets added from outside the mount
point should be adjusted to ne unique again
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 07a0acf00a5..02a8ebab93a 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -517,14 +517,14 @@ class Shared extends \OC\Files\Storage\Common { $parent = dirname($parent); } - $newMountPoint = \OC\Files\Filesystem::normalizePath($parent . '/' . $mountPoint); + $newMountPoint = \OCA\Files_Sharing\Helper::generateUniqueTarget( + \OC\Files\Filesystem::normalizePath($parent . '/' . $mountPoint), + array(), + new \OC\Files\View('/' . \OCP\User::getUser() . '/files') + ); if($newMountPoint !== $share['file_target']) { - $newMountPoint = \OCA\Files_Sharing\Helper::generateUniqueTarget( - $newMountPoint, - array(), - new \OC\Files\View('/' . \OCP\User::getUser() . '/files') - ); + self::updateFileTarget($newMountPoint, $share); $share['file_target'] = $newMountPoint; |