mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
feat(electron): backup panel (#9738)
fix PD-2071, PD-2059, PD-2069, PD-2068
This commit is contained in:
@@ -160,7 +160,6 @@ export const test = base.extend<{
|
||||
});
|
||||
|
||||
await use(electronApp);
|
||||
console.log('Cleaning up...');
|
||||
const pages = electronApp.windows();
|
||||
for (const page of pages) {
|
||||
await page.close();
|
||||
|
||||
@@ -24,11 +24,9 @@ export async function removeWithRetry(
|
||||
for (let i = 0; i < maxRetries; i++) {
|
||||
try {
|
||||
await fs.remove(filePath);
|
||||
console.log(`File ${filePath} successfully deleted.`);
|
||||
return true;
|
||||
} catch (err: any) {
|
||||
if (err.code === 'EBUSY' || err.code === 'EPERM') {
|
||||
console.log(`File ${filePath} is busy or locked, retrying...`);
|
||||
await setTimeout(delay);
|
||||
} else {
|
||||
console.error(`Failed to delete file ${filePath}:`, err);
|
||||
|
||||
Reference in New Issue
Block a user