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
This commit is contained in:
		| @@ -35,7 +35,7 @@ final class PhabricatorFileComposeController | |||||||
|  |  | ||||||
|       $data = $composer->loadBuiltinFileData(); |       $data = $composer->loadBuiltinFileData(); | ||||||
|  |  | ||||||
|       $file = PhabricatorFile::buildFromFileDataOrHash( |       $file = PhabricatorFile::newFromFileData( | ||||||
|         $data, |         $data, | ||||||
|         array( |         array( | ||||||
|           'name' => $composer->getBuiltinDisplayName(), |           'name' => $composer->getBuiltinDisplayName(), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley