Skip to content

Commit

Permalink
FIX ISSUE:
Browse files Browse the repository at this point in the history
Getting Cannot perform diff-update error for subsequent updates:
mapiacompany#76

Based on this PR:
https://github.com/mapiacompany/capacitor-codepush#pull/77
  • Loading branch information
EloyEscenit committed Apr 1, 2023
1 parent 96098f8 commit e443f61
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions dist/esm/fileUtil.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/fileUtil.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/remotePackage.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/plugin.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"swiftlint": "node-swiftlint",
"build": "npm run clean && tsc && rollup -c rollup.config.js",
"clean": "rimraf ./dist",
"watch": "tsc --watch"
"watch": "tsc --watch",
"prepublishOnly": "npm run build"
},
"keywords": [
"capacitor",
Expand Down
6 changes: 3 additions & 3 deletions src/fileUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export class FileUtil {
for (let i = 0; i < files.length; i++) {
const file = files[i];
// @ts-ignore
if (ignoreList.includes(file)) continue;
const sourcePath = sourceDir.path + "/" + file;
const destPath = destinationDir.path + "/" + file;
if (ignoreList.includes(file.name)) continue;
const sourcePath = sourceDir.path + "/" + file.name;
const destPath = destinationDir.path + "/" + file.name;
const source = { ...sourceDir, path: sourcePath };
const destination = { ...destinationDir, path: destPath };
if (await FileUtil.directoryExists(source.directory, source.path)) { // is directory
Expand Down
2 changes: 1 addition & 1 deletion src/remotePackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class RemotePackage extends Package implements IRemotePackage {
data: downloadedFile.data,
path: file,
directory: Directory.Data,
})
});
} catch (e) {
CodePushUtil.throwError(new Error("An error occured while downloading the package. " + (e && e.message) ? e.message : ""));
} finally {
Expand Down

0 comments on commit e443f61

Please sign in to comment.