1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +01:00

Stop arc from destroying files under HPHPi.

Summary:

Test Plan:

Reviewers:

CC:
This commit is contained in:
epriestley 2011-02-24 14:08:49 -08:00
parent 309609169d
commit c13147cf53

View file

@ -106,7 +106,12 @@ final class ArcanistLintPatcher {
$new_str = $lint->getReplacementText();
$new_len = strlen($new_str);
if ($working_offset == strlen($data)) {
// Temporary hack to work around a destructive hphpi issue, see #451031.
$data .= $new_str;
} else {
$data = substr_replace($data, $new_str, $working_offset, $old_len);
}
$this->changeCharacterDelta($new_len - $old_len);
$this->setDirtyCharacterOffset($orig_offset + $old_len);