Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Unawaited promises

Manav Rathi82316ff290f4
diff --git a/desktop/.eslintrc.js b/desktop/.eslintrc.js
index 541ba33a9c..daf2c2838e 100644
--- a/desktop/.eslintrc.js
+++ b/desktop/.eslintrc.js
@@ -29,6 +29,6 @@ module.exports = {
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-misused-promises": "off",
- "@typescript-eslint/no-floating-promises": "off",
+ // "@typescript-eslint/no-floating-promises": "off",
},
};
diff --git a/desktop/src/main/menu.ts b/desktop/src/main/menu.ts
index 0693c01dc0..5dd2b335ef 100644
--- a/desktop/src/main/menu.ts
+++ b/desktop/src/main/menu.ts
@@ -35,7 +35,7 @@ export const createApplicationMenu = async (mainWindow: BrowserWindow) => {
);
const toggleAutoLaunch = () => {
- autoLauncher.toggleAutoLaunch();
+ void autoLauncher.toggleAutoLaunch();
isAutoLaunchEnabled = !isAutoLaunchEnabled;
};
diff --git a/desktop/src/main/services/upload.ts b/desktop/src/main/services/upload.ts
index cf96399190..96835bfb00 100644
--- a/desktop/src/main/services/upload.ts
+++ b/desktop/src/main/services/upload.ts
@@ -20,7 +20,7 @@ export const listZipItems = async (zipPath: string): Promise<ZipItem[]> => {
}
}
- zip.close();
+ await zip.close();
return entryNames.map((entryName) => [zipPath, entryName]);
};
@@ -40,7 +40,7 @@ export const pathOrZipItemSize = async (
`An entry with name ${entryName} does not exist in the zip file at ${zipPath}`,
);
const size = entry.size;
- zip.close();
+ await zip.close();
return size;
}
};
diff --git a/desktop/src/main/utils/temp.ts b/desktop/src/main/utils/temp.ts
index b336a902f1..582f0a2b3d 100644
--- a/desktop/src/main/utils/temp.ts
+++ b/desktop/src/main/utils/temp.ts
@@ -114,7 +114,7 @@ export const makeFileForDataOrPathOrZipItem = async (
const [zipPath, entryName] = dataOrPathOrZipItem;
const zip = new StreamZip.async({ file: zipPath });
await zip.extract(entryName, path);
- zip.close();
+ await zip.close();
};
}
}