Skip to content

Commit cd8dd48

Browse files
committed
Fixing bug where non-modified files were reported as modified
This would cause errors if these files were deleted in the app, when trying to generate the patch
1 parent f4ddbdc commit cd8dd48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Update/RecipePatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function generatePatch(array $originalFiles, array $newFiles): RecipePatc
9797
$modifiedFiles = array_intersect_key(array_keys($originalFiles), array_keys($newFiles));
9898
$deletedModifiedFiles = [];
9999
foreach ($modifiedFiles as $modifiedFile) {
100-
if (!file_exists($this->rootDir.'/'.$modifiedFile)) {
100+
if (!file_exists($this->rootDir.'/'.$modifiedFile) && $originalFiles[$modifiedFile] !== $newFiles[$modifiedFile]) {
101101
$deletedModifiedFiles[] = $modifiedFile;
102102
}
103103
}

0 commit comments

Comments
 (0)