exif: resume on failure to get file (fix #820)
Signed-off-by: Varun Patil <radialapps@gmail.com>dexie
parent
fa9d26e3da
commit
23843c3ded
|
@ -68,9 +68,15 @@ class Exif
|
|||
/**
|
||||
* Get exif data as a JSON object from a Nextcloud file.
|
||||
*/
|
||||
public static function getExifFromFile(File &$file)
|
||||
public static function getExifFromFile(File $file)
|
||||
{
|
||||
try {
|
||||
$path = $file->getStorage()->getLocalFile($file->getInternalPath());
|
||||
} catch (\Throwable $ex) {
|
||||
// https://github.com/pulsejet/memories/issues/820
|
||||
throw new \Exception('Failed to get local file: '.$ex->getMessage());
|
||||
}
|
||||
|
||||
if (!\is_string($path)) {
|
||||
throw new \Exception('Failed to get local file path');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue