Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import java.security.spec.X509EncodedKeySpec;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import name.fraser.neil.plaintext.diff_match_patch;
Expand Down Expand Up @@ -118,8 +120,13 @@ public static void copyNecessaryFilesFromCurrentPackage(String diffManifestFileP
public static void diffPatchApplyNecessaryFilesFromCurrentPackage(String diffManifestFilePath, String currentPackageFolderPath, String unzippedFolderPath) throws IOException {
diff_match_patch dmp = new diff_match_patch();
JSONObject diffManifest = CodePushUtils.getJsonObjectFromFile(diffManifestFilePath);
JSONArray patchedFiles = new JSONArray();
try {
patchedFiles = diffManifest.getJSONArray("patchedFiles");
} catch (JSONException ignored) {

}
try {
JSONArray patchedFiles = diffManifest.getJSONArray("patchedFiles");
for (int i = 0; i < patchedFiles.length(); i++) {
String fileNameToPatch = patchedFiles.getString(i);
File fileToPatch = new File(currentPackageFolderPath, fileNameToPatch);
Expand Down Expand Up @@ -286,4 +293,4 @@ public static void verifyUpdateSignature(String folderPath, String packageHash,

CodePushUtils.log("The update contents succeeded the code signing check.");
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what this ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you mean just the last brace then it is mean that you added new line at the end of file. Possible it is so because your automation code-style generator added this new line.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, it's right, i found the answer when open with sublime text2.

}