Use nextclouds temp dir (#493)

This commit is contained in:
Benjamin Brahmer 2019-04-11 12:59:05 +02:00 committed by GitHub
parent bcd1fd7be1
commit 6410d92f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@ use OCP\IContainer;
use OCP\INavigationManager;
use OCP\IURLGenerator;
use OCP\IConfig;
use OCP\ITempManager;
use OCP\AppFramework\App;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
@ -174,7 +175,8 @@ class Application extends App
$container->registerService(Favicon::class, function (IContainer $c): Favicon {
$favicon = new Favicon();
$settings = ['dir' => sys_get_temp_dir()];
$tempManager = $c->query(ITempManager::class);
$settings = ['dir' => $tempManager->getTempBaseDir()];
$favicon->cache($settings);
return $favicon;
});