Skip to content

Commit

Permalink
wording tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimiry committed Mar 13, 2019
1 parent 1e90389 commit 2606ffb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/electron-main/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const initApi = async (ctx: Context): Promise<Endpoints> => {

for (const [name, value] of Object.entries(stores)) {
// overriding the config file even if it exists
const override = (await value.dest.readable() && name === "config") || undefined;
const overwrite = (await value.dest.readable() && name === "config") || undefined;
const srcReadable: boolean | "denied read access" = isSnapPackage
? await (async () => {
try {
Expand All @@ -123,10 +123,10 @@ export const initApi = async (ctx: Context): Promise<Endpoints> => {
dest: value.dest.file,
skip: srcReadable !== true
? srcReadable || "source doesn't exist"
: await value.dest.readable() !== true || override
: await value.dest.readable() !== true || overwrite
? undefined
: "destination exists",
override,
overwrite,
};
}

Expand Down Expand Up @@ -155,12 +155,12 @@ export const initApi = async (ctx: Context): Promise<Endpoints> => {
})()),

migrate: ({config, settings, database}) => from((async () => {
for (const {skip, src, dest, override} of [config, settings, database]) {
for (const {skip, src, dest, overwrite} of [config, settings, database]) {
if (skip) {
continue;
}

await fsExtra.copyFile(src, dest, override ? 0 : FsConstants.COPYFILE_EXCL);
await fsExtra.copyFile(src, dest, overwrite ? 0 : FsConstants.COPYFILE_EXCL);
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/api/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export interface InitResponse {
src: string;
dest: string;
skip?: "source doesn't exist" | "destination exists" | "denied read access";
override?: boolean;
overwrite?: boolean;
}>;
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ export const PROVIDER_REPO: Record<AccountType, { repo: string, version: string;
protonmail: {
repo: "https://github.com/ProtonMail/WebClient.git",
commit: "9ba3d434268720a83803910c58bd79b38f5cfd1b",
version: "3.15.20+",
version: "3.15.20",
},
tutanota: {
repo: "https://github.com/tutao/tutanota.git",
commit: "d4e695a79c56ca047c0dee292428b3b53e946e63",
version: "3.48.1+",
version: "3.48.1",
},
};

Expand Down
3 changes: 0 additions & 3 deletions src/web/src/app/_options/migrating.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
<ng-container *ngIf="copyV2App.data.items[itemKey].skip">
<span>({{ copyV2App.data.items[itemKey].skip }})</span>
</ng-container>
<ng-container *ngIf="copyV2App.data.items[itemKey].override && !copyV2App.data.items[itemKey].skip">
<span>(override)</span>
</ng-container>
</li>
</ul>
<p *ngIf="copyV2App.data.v2SnapDeniedRead">
Expand Down

0 comments on commit 2606ffb

Please sign in to comment.