summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-04-25 19:30:46 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-04-25 19:30:58 -0400
commitc20abfef388f9159e71b71c17a57d849faa5d913 (patch)
treee60191ac8b3289dc4a05553c004865c6d034ecbe /apps/files_sharing
parent249e0c1ee2c385e873c339001f25d7fec7f1acdc (diff)
downloadnextcloud-server-c20abfef388f9159e71b71c17a57d849faa5d913.tar.gz
nextcloud-server-c20abfef388f9159e71b71c17a57d849faa5d913.zip
Fix a counting mistake
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib_share.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php
index 84def87963a..62ac05a5952 100644
--- a/apps/files_sharing/lib_share.php
+++ b/apps/files_sharing/lib_share.php
@@ -450,7 +450,7 @@ class OC_Share {
$query = OC_DB::prepare('INSERT INTO *PREFIX*sharing VALUES(?,?,?,?,?)');
$sharedFolder = '/'.$arguments['uid'].'/files/Shared/';
$lastSource = '';
- for ($i = 0; i < count($result); $i++) {
+ for ($i = 0; $i < count($result) - 1; $i++) {
if ($result[$i]['source'] != $lastSource) {
$query->execute(array($result[$i]['uid_owner'], $arguments['uid'].'@'.$arguments['gid'], $result[$i]['source'], $sharedFolder.basename($result[$i]['source']), $result[$i]['permissions']));
$lastSource = $result[$i]['source'];