From 39076dcb6e5f400257dc4e543c843fc2194b6621 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Mon, 29 Jul 2024 18:17:58 -0500 Subject: [PATCH] Only run ensureFilePermissions() once as a migration Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> --- ts/background.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/background.ts b/ts/background.ts index 6135845d4c..c61e934f26 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -897,6 +897,10 @@ export async function startApp(): Promise { ); } + if (window.isBeforeVersion(lastVersion, 'v1.32.0-beta.4')) { + drop(DataWriter.ensureFilePermissions()); + } + if ( window.isBeforeVersion(lastVersion, 'v1.36.0-beta.1') && window.isAfterVersion(lastVersion, 'v1.35.0-beta.1') @@ -964,8 +968,6 @@ export async function startApp(): Promise { if (newVersion || window.storage.get('needOrphanedAttachmentCheck')) { await window.storage.remove('needOrphanedAttachmentCheck'); await DataWriter.cleanupOrphanedAttachments(); - - drop(DataWriter.ensureFilePermissions()); } if (