Fix path of file_get_contents

Try to fix #28370  and #27441 

Avoid pre-pends the `$path` to the user's own storage.
This commit is contained in:
acsfer 2021-08-17 13:03:45 +02:00 committed by GitHub
parent 0edfb24f14
commit a3c69b8310
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -641,7 +641,7 @@ class OC_Image implements \OCP\IImage {
default:
// this is mostly file created from encrypted file
$this->resource = imagecreatefromstring(\OC\Files\Filesystem::file_get_contents(\OC\Files\Filesystem::getLocalPath($imagePath)));
$this->resource = imagecreatefromstring(file_get_contents(\OC\Files\Filesystem::getLocalPath($imagePath)));
$iType = IMAGETYPE_PNG;
$this->logger->debug('OC_Image->loadFromFile, Default', ['app' => 'core']);
break;