diff options
author | Björn Schießle <schiessle@owncloud.com> | 2014-05-21 14:07:49 -0400 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2014-05-21 14:07:49 -0400 |
commit | 14a953fbe01a3d26e1330ea224ab71928a2f93c1 (patch) | |
tree | 1e8feffaf4e6deded6c1b54b5565646a70374a6d /apps/files_sharing/lib/share | |
parent | c586d1f4d550563310b998a724309a6e645e8729 (diff) | |
parent | 5f403f3e920ea8f6ed5d0441762b3e4f4a9bd38e (diff) | |
download | nextcloud-server-14a953fbe01a3d26e1330ea224ab71928a2f93c1.tar.gz nextcloud-server-14a953fbe01a3d26e1330ea224ab71928a2f93c1.zip |
Merge pull request #8416 from owncloud/sharing_keep_mount_points_visible
[sharing] move the mount point up if the parent folder no longer exists
Diffstat (limited to 'apps/files_sharing/lib/share')
-rw-r--r-- | apps/files_sharing/lib/share/file.php | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index af71786b104..91595461a61 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -75,16 +75,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { $excludeList = array_merge($excludeList, $exclude); } - $pathinfo = pathinfo($target); - $ext = (isset($pathinfo['extension'])) ? '.'.$pathinfo['extension'] : ''; - $name = $pathinfo['filename']; - $i = 2; - while ($view->file_exists($target) || in_array($target, $excludeList)) { - $target = '/' . $name . ' ('.$i.')' . $ext; - $i++; - } - - return $target; + return \OCA\Files_Sharing\Helper::generateUniqueTarget($target, $excludeList, $view); } public function formatItems($items, $format, $parameters = null) { |