From 995b8bf12ac5f028ba643d090c41c4393ae040a8 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sun, 7 Oct 2012 17:34:21 -0400 Subject: [PATCH] Remove old Shared folders from the file cache, fixes bug oc-1911 --- apps/files_sharing/appinfo/update.php | 8 ++++++++ apps/files_sharing/appinfo/version | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index 2beeb6316bd..23f2afea7e1 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -62,3 +62,11 @@ if (version_compare($installedVersion, '0.3', '<')) { // $query = OCP\DB::prepare('DROP TABLE `*PREFIX*sharing`'); // $query->execute(); } +if (version_compare($installedVersion, '0.3.3', '<')) { + OC_User::useBackend(new OC_User_Database()); + OC_App::loadApps(array('authentication')); + $users = OC_User::getUsers(); + foreach ($users as $user) { + OC_FileCache::delete('Shared', '/'.$user.'/files/'); + } +} \ No newline at end of file diff --git a/apps/files_sharing/appinfo/version b/apps/files_sharing/appinfo/version index 9fc80f937fa..87a0871112f 100644 --- a/apps/files_sharing/appinfo/version +++ b/apps/files_sharing/appinfo/version @@ -1 +1 @@ -0.3.2 \ No newline at end of file +0.3.3 \ No newline at end of file -- 2.39.5