diff options
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/updater.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php index aac4ed196de..a34140f5a35 100644 --- a/apps/files_sharing/lib/updater.php +++ b/apps/files_sharing/lib/updater.php @@ -204,8 +204,8 @@ class Shared_Updater { static public function fixBrokenSharesOnAppUpdate() { // delete all shares where the original file no longer exists $findAndRemoveShares = \OC_DB::prepare('DELETE FROM `*PREFIX*share` ' . - 'WHERE `file_source` NOT IN ( ' . - 'SELECT `fileid` FROM `*PREFIX*filecache` WHERE `item_type` IN (\'file\', \'folder\'))' + 'WHERE `item_type` IN (\'file\', \'folder\') ' . + 'AND `file_source` NOT IN (SELECT `fileid` FROM `*PREFIX*filecache`)' ); $findAndRemoveShares->execute(array()); } |