From 2dbd6c539cde6eec03862f933188a4a6c4e1a860 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 5 Mar 2016 02:30:28 +0100 Subject: [PATCH] FileNotFoundException won't be thrown if MediaFile works as it should In newer GNU social MediaFile will make sure the local file exists, if we're trying to upload something that matches by hash in the File table. For the current 'master' when I'm pushing this that won't be handled correctly, but then again it would only be a problem if something has been f'd already and you're missing files from the filesystem that are listed in the File table. --- actions/apiupdateavatar.php | 1 - 1 file changed, 1 deletion(-) diff --git a/actions/apiupdateavatar.php b/actions/apiupdateavatar.php index 7495740..b234b55 100644 --- a/actions/apiupdateavatar.php +++ b/actions/apiupdateavatar.php @@ -101,7 +101,6 @@ class ApiUpdateAvatarAction extends ApiAuthAction fclose($fh); // Now try to get it as an ImageFile since it has some handy functions - // but will throw a FileNotFoundException if the file doesn't exist. $imagefile = ImageFile::fromFileObject($mediafile->fileRecord); unset($mediafile); // This isn't needed in memory.