[Pkg-owncloud-commits] [owncloud] 127/153: always check for unique filename, if a file gets added from outside the mount point should be adjusted to ne unique again
David Prévot
taffit at moszumanska.debian.org
Tue May 27 03:05:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 11aa2cf74b813800cae5fdee426ed83196a34139
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Thu May 22 14:29:23 2014 +0200
always check for unique filename, if a file gets added from outside the mount
point should be adjusted to ne unique again
---
apps/files_sharing/lib/sharedstorage.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 07a0acf..02a8eba 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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list