From: Björn Schießle Date: Tue, 2 Oct 2012 09:28:19 +0000 (+0200) Subject: don't use the complete path but the basename if the file/foder has no extension.... X-Git-Tag: v4.5.0RC2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=550813ce411daa5f3665f9e8a4cec111d04ff486;p=nextcloud-server.git don't use the complete path but the basename if the file/foder has no extension. Otherwise we can end up with different items in the shared directory with the same name (Also folder names can contain dots) --- diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index 074ca9928d4..9a880505926 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -53,7 +53,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { $name = substr($target, 0, $pos); $ext = substr($target, $pos); } else { - $name = $filePath; + $name = $target; $ext = ''; } $i = 2;