Skip to content
Snippets Groups Projects
Commit 11aa2cf7 authored by Björn Schießle's avatar Björn Schießle
Browse files

always check for unique filename, if a file gets added from outside the mount

point should be adjusted to ne unique again
parent 1166d62d
Branches
No related tags found
No related merge requests found
......@@ -517,14 +517,14 @@ class Shared extends \OC\Files\Storage\Common {
$parent = dirname($parent);
}
$newMountPoint = \OC\Files\Filesystem::normalizePath($parent . '/' . $mountPoint);
if($newMountPoint !== $share['file_target']) {
$newMountPoint = \OCA\Files_Sharing\Helper::generateUniqueTarget(
$newMountPoint,
\OC\Files\Filesystem::normalizePath($parent . '/' . $mountPoint),
array(),
new \OC\Files\View('/' . \OCP\User::getUser() . '/files')
);
if($newMountPoint !== $share['file_target']) {
self::updateFileTarget($newMountPoint, $share);
$share['file_target'] = $newMountPoint;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment