From 995b8bf12ac5f028ba643d090c41c4393ae040a8 Mon Sep 17 00:00:00 2001
From: Michael Gapczynski <mtgap@owncloud.com>
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 2beeb6316b..23f2afea7e 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 9fc80f937f..87a0871112 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
-- 
GitLab