From 1a6718c979a083c5b26c10a5468fed990103338a Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sat, 16 Jul 2011 15:15:18 -0400 Subject: [PATCH] Add extra check for opendir() so it only adds the file to fakedirs if it has a different name than the source --- apps/files_sharing/sharedstorage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php index 175a58d1599..b27d91de966 100644 --- a/apps/files_sharing/sharedstorage.php +++ b/apps/files_sharing/sharedstorage.php @@ -99,8 +99,8 @@ class OC_FILESTORAGE_SHARED extends OC_FILESTORAGE { $sources = array(); $targets = array(); foreach ($modifiedItems as $item) { - // If item is in current directory, add it to the arrays - if (dirname($item['target']) == $path) { + // If the item is in the current directory and has a different name than the source, add it to the arrays + if (dirname($item['target']) == $path && basename($item['source']) != basename($item['target'])) { $sources[] = basename($item['source']); $targets[] = basename($item['target']); }