diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-22 20:57:15 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-22 20:57:15 +0100 |
commit | 7330fcf5e81e7d91ed37f01da7cc45833e10f1c4 (patch) | |
tree | 2a6e137a21d42902be616adfe9e2d4aee60bfaef /lib/files | |
parent | db2b485b9681b93200bcca6b5780b78008f9c1de (diff) | |
download | nextcloud-server-7330fcf5e81e7d91ed37f01da7cc45833e10f1c4.tar.gz nextcloud-server-7330fcf5e81e7d91ed37f01da7cc45833e10f1c4.zip |
Cache: make mounts overwrite existing folders, prevents duplicate entries
Diffstat (limited to 'lib/files')
-rw-r--r-- | lib/files/view.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/files/view.php b/lib/files/view.php index 06027910123..c50897603eb 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -794,6 +794,14 @@ class View { $subPermissionsCache->set($rootEntry['fileid'], $user, $permissions); } $rootEntry['permissions'] = $permissions; + + //remove any existing entry with the same name + foreach ($files as $i => $file) { + if ($file['name'] === $rootEntry['name']) { + unset($files[$i]); + break; + } + } $files[] = $rootEntry; } } |