diff options
author | C. Montero Luque <cmonteroluque@users.noreply.github.com> | 2016-04-26 16:46:23 -0400 |
---|---|---|
committer | C. Montero Luque <cmonteroluque@users.noreply.github.com> | 2016-04-26 16:46:23 -0400 |
commit | fe753fe722642ccb42f73589d6f9f81ccb5bd983 (patch) | |
tree | 2c3909c19b5cd762f112e7cb61cf9ca95aea78da /lib | |
parent | 884c8215f800e4753e71a03df26f26459f480964 (diff) | |
parent | 98820f2af3f31400097192ed7458c40e607789b4 (diff) | |
download | nextcloud-server-fe753fe722642ccb42f73589d6f9f81ccb5bd983.tar.gz nextcloud-server-fe753fe722642ccb42f73589d6f9f81ccb5bd983.zip |
Merge branch 'stable9' into local-invalid-9
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/utils/scanner.php | 16 | ||||
-rw-r--r-- | lib/private/installer.php | 3 | ||||
-rw-r--r-- | lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php | 1 |
3 files changed, 19 insertions, 1 deletions
diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php index 06526583899..b013cbecabc 100644 --- a/lib/private/files/utils/scanner.php +++ b/lib/private/files/utils/scanner.php @@ -29,6 +29,7 @@ use OC\Files\Filesystem; use OC\ForbiddenException; use OC\Hooks\PublicEmitter; use OC\Lock\DBLockingProvider; +use OCP\Files\Storage\IStorage; use OCP\Files\StorageNotAvailableException; use OCP\ILogger; @@ -153,6 +154,17 @@ class Scanner extends PublicEmitter { $scanner->setUseTransactions(false); $this->attachListener($mount); $isDbLocking = \OC::$server->getLockingProvider() instanceof DBLockingProvider; + + $scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) { + $this->triggerPropagator($storage, $path); + }); + $scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) { + $this->triggerPropagator($storage, $path); + }); + $scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) { + $this->triggerPropagator($storage, $path); + }); + if (!$isDbLocking) { $this->db->beginTransaction(); } @@ -168,5 +180,9 @@ class Scanner extends PublicEmitter { } } } + + private function triggerPropagator(IStorage $storage, $internalPath) { + $storage->getPropagator()->propagateChange($internalPath, time()); + } } diff --git a/lib/private/installer.php b/lib/private/installer.php index fca9fce23ef..f1d4d551786 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -269,7 +269,8 @@ class OC_Installer{ //download the file if necessary if($data['source']=='http') { $pathInfo = pathinfo($data['href']); - $path = \OC::$server->getTempManager()->getTemporaryFile('.' . $pathInfo['extension']); + $extension = isset($pathInfo['extension']) ? '.' . $pathInfo['extension'] : ''; + $path = \OC::$server->getTempManager()->getTemporaryFile($extension); if(!isset($data['href'])) { throw new \Exception($l->t("No href specified when installing app from http")); } diff --git a/lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php b/lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php index e4b9c0f1998..29deea6268d 100644 --- a/lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php +++ b/lib/private/integritycheck/iterator/excludefoldersbypathfilteriterator.php @@ -44,6 +44,7 @@ class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator { // See https://github.com/owncloud/updater/issues/318#issuecomment-212497846 rtrim($root . '/updater', '/'), rtrim($root . '/_oc_upgrade', '/'), + rtrim($root . '/__apps', '/'), ]; $customDataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', ''); if($customDataDir !== '') { |