From: tuomaspelkonen Date: Wed, 25 May 2011 00:07:14 +0000 (-0700) Subject: Image files should also be treated as binary files when patching. X-Git-Tag: conduit-4~330 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1ef7aacff1adc604c89268a8776361e4f251afa9;p=arcanist.git 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 --- 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);