aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-07-13 15:17:36 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-07-13 15:17:36 +0200
commit50eef9a71cfa88ef4b1e5162a288f29410306c95 (patch)
treeabfd84f3e81e32d515f83c1e8946e5b9a23545a3
parent80ed5412f10beafed0674c9942705f3f11a3c972 (diff)
downloadnextcloud-server-50eef9a71cfa88ef4b1e5162a288f29410306c95.tar.gz
nextcloud-server-50eef9a71cfa88ef4b1e5162a288f29410306c95.zip
update script to fix fscache
-rw-r--r--apps/files_sharing/appinfo/update.php16
-rw-r--r--apps/files_sharing/appinfo/version2
2 files changed, 17 insertions, 1 deletions
diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php
new file mode 100644
index 00000000000..b43269d69f7
--- /dev/null
+++ b/apps/files_sharing/appinfo/update.php
@@ -0,0 +1,16 @@
+<?php
+
+// touch shared directories to trigger one-time re-scan for all users
+$datadir = \OCP\Config::getSystemValue('datadirectory');
+$currentVersion=OC_Appconfig::getValue('files_sharing', 'installed_version');
+if (version_compare($currentVersion, '0.2.2', '<')) {
+ if ($handle = opendir($datadir)) {
+ while (false !== ($entry = readdir($handle))) {
+ $sharedFolder = $datadir.'/'.$entry.'/files/Shared';
+ if ($entry != "." && $entry != ".." && is_dir($sharedFolder)) {
+ touch($sharedFolder);
+ }
+ }
+ closedir($handle);
+ }
+} \ No newline at end of file
diff --git a/apps/files_sharing/appinfo/version b/apps/files_sharing/appinfo/version
index 7dff5b89211..f4778493c50 100644
--- a/apps/files_sharing/appinfo/version
+++ b/apps/files_sharing/appinfo/version
@@ -1 +1 @@
-0.2.1 \ No newline at end of file
+0.2.2 \ No newline at end of file