Only run ensureFilePermissions() once as a migration

This commit is contained in:
ayumi-signal 2024-07-29 14:56:23 -07:00 committed by GitHub
parent b965e1f9a5
commit f4a18414f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -897,6 +897,10 @@ export async function startApp(): Promise<void> {
);
}
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<void> {
if (newVersion || window.storage.get('needOrphanedAttachmentCheck')) {
await window.storage.remove('needOrphanedAttachmentCheck');
await DataWriter.cleanupOrphanedAttachments();
drop(DataWriter.ensureFilePermissions());
}
if (