From 1ef7aacff1adc604c89268a8776361e4f251afa9 Mon Sep 17 00:00:00 2001 From: tuomaspelkonen Date: Tue, 24 May 2011 17:07:14 -0700 Subject: [PATCH] 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 --- src/parser/bundle/ArcanistBundle.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parser/bundle/ArcanistBundle.php b/src/parser/bundle/ArcanistBundle.php index b4ca908c..4f2dfad7 100644 --- a/src/parser/bundle/ArcanistBundle.php +++ b/src/parser/bundle/ArcanistBundle.php @@ -185,7 +185,8 @@ class ArcanistBundle { $old_mode = idx($change->getOldProperties(), '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) { $change_body = $this->buildBinaryChange($change);