fix loading custom logo image

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2023-05-15 17:38:43 +02:00 committed by backportbot-nextcloud[bot]
parent 68acce900a
commit c63748a95c
3 changed files with 6 additions and 6 deletions

View file

@ -190,7 +190,7 @@ class Util {
if ($this->config->getAppValue('theming', 'logoMime', '') !== '') {
$logoFile = null;
try {
$folder = $this->appData->getFolder('images');
$folder = $this->appData->getFolder('global/images');
return $folder->getFile('logo');
} catch (NotFoundException $e) {
}

View file

@ -103,7 +103,7 @@ class IconBuilderTest extends TestCase {
->willReturn($color);
$this->appData->expects($this->once())
->method('getFolder')
->with('images')
->with('global/images')
->willThrowException(new NotFoundException());
$expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file);
@ -132,7 +132,7 @@ class IconBuilderTest extends TestCase {
->willReturn($color);
$this->appData->expects($this->once())
->method('getFolder')
->with('images')
->with('global/images')
->willThrowException(new NotFoundException());
$expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file);
@ -165,7 +165,7 @@ class IconBuilderTest extends TestCase {
->willReturn($color);
$this->appData->expects($this->once())
->method('getFolder')
->with('images')
->with('global/images')
->willThrowException(new NotFoundException());
$expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file);

View file

@ -138,7 +138,7 @@ class UtilTest extends TestCase {
public function testGetAppIcon($app, $expected) {
$this->appData->expects($this->any())
->method('getFolder')
->with('images')
->with('global/images')
->willThrowException(new NotFoundException());
$this->appManager->expects($this->once())
->method('getAppPath')
@ -165,7 +165,7 @@ class UtilTest extends TestCase {
->willReturn($file);
$this->appData->expects($this->once())
->method('getFolder')
->with('images')
->with('global/images')
->willReturn($folder);
$icon = $this->util->getAppIcon('noapplikethis');
$this->assertEquals($file, $icon);