1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-29 02:02:40 +01:00

Image files should also be treated as binary files when patching.

Summary:
Arc patch for image files failed, because they were treated like text
files.

Test Plan:
Tested that 'arc patch' worked for a png file.

Reviewed By: jungejason
Reviewers: epriestley, jungejason
CC: aran, jungejason
Differential Revision: 341
This commit is contained in:
tuomaspelkonen 2011-05-24 17:07:14 -07:00
parent 13ea6ea5b6
commit 1ef7aacff1

View file

@ -185,7 +185,8 @@ class ArcanistBundle {
$old_mode = idx($change->getOldProperties(), 'unix:filemode', '100644'); $old_mode = idx($change->getOldProperties(), 'unix:filemode', '100644');
$new_mode = idx($change->getNewProperties(), 'unix:filemode', '100644'); $new_mode = idx($change->getNewProperties(), 'unix:filemode', '100644');
$is_binary = ($file_type == ArcanistDiffChangeType::FILE_BINARY); $is_binary = ($file_type == ArcanistDiffChangeType::FILE_BINARY ||
$file_type == ArcanistDiffChangeType::FILE_IMAGE);
if ($is_binary) { if ($is_binary) {
$change_body = $this->buildBinaryChange($change); $change_body = $this->buildBinaryChange($change);