From 830f3eb8f803bda281f5b98e0519d39bed519e4c Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 11 Jul 2016 08:20:42 -0700 Subject: [PATCH] When users choose a default project icon, make a permanent file Summary: Fixes T10907. As written, this workflow will incorrectly reuse a temporary file if one exists. Instead, make a new permanent file. (Storage is still shared, so this usually will not actually create a copy of the file's data.) Test Plan: - Set a project's icon by clicking first button in "Use Picture" row. - Before patch: temporary image was reused. - After patch: new permanent file is generated. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10907 Differential Revision: https://secure.phabricator.com/D16270 --- .../files/controller/PhabricatorFileComposeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/files/controller/PhabricatorFileComposeController.php b/src/applications/files/controller/PhabricatorFileComposeController.php index 6a4536d94a..930ec61483 100644 --- a/src/applications/files/controller/PhabricatorFileComposeController.php +++ b/src/applications/files/controller/PhabricatorFileComposeController.php @@ -35,7 +35,7 @@ final class PhabricatorFileComposeController $data = $composer->loadBuiltinFileData(); - $file = PhabricatorFile::buildFromFileDataOrHash( + $file = PhabricatorFile::newFromFileData( $data, array( 'name' => $composer->getBuiltinDisplayName(),