Add extra check for opendir() so it only adds the file to fakedirs if it has a different name than the source

This commit is contained in:
Michael Gapczynski 2011-07-16 15:15:18 -04:00
parent f3f8a96c6d
commit 1a6718c979
1 changed files with 2 additions and 2 deletions

View File

@ -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']);
}