1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01:00

Set name parameter when saving file via Drydock

Summary: This sets the name parameter when Drydock uploads a file so that the storage engine picks it up correctly.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D8673
This commit is contained in:
James Rhodes 2014-04-03 09:21:35 -07:00 committed by epriestley
parent 26c836e1e1
commit 85394a9e9e

View file

@ -46,7 +46,9 @@ final class DrydockSFTPFilesystemInterface extends DrydockFilesystemInterface {
public function saveFile($path, $name) {
$data = $this->readFile($path);
$file = PhabricatorFile::newFromFileData($data);
$file = PhabricatorFile::newFromFileData(
$data,
array('name' => $name));
$file->setName($name);
$file->save();
return $file;