mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-30 05:10:53 +01:00
Ensure proper file permissions on startup
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
@@ -33,6 +33,7 @@ const ERASE_STICKERS_KEY = 'erase-stickers';
|
||||
const ERASE_TEMP_KEY = 'erase-temp';
|
||||
const ERASE_DRAFTS_KEY = 'erase-drafts';
|
||||
const CLEANUP_ORPHANED_ATTACHMENTS_KEY = 'cleanup-orphaned-attachments';
|
||||
const ENSURE_FILE_PERMISSIONS = 'ensure-file-permissions';
|
||||
|
||||
const _jobs = Object.create(null);
|
||||
const _DEBUG = false;
|
||||
@@ -169,6 +170,7 @@ module.exports = {
|
||||
|
||||
removeOtherData,
|
||||
cleanupOrphanedAttachments,
|
||||
ensureFilePermissions,
|
||||
|
||||
// Returning plain JSON
|
||||
getMessagesNeedingUpgrade,
|
||||
@@ -1043,6 +1045,10 @@ async function cleanupOrphanedAttachments() {
|
||||
await callChannel(CLEANUP_ORPHANED_ATTACHMENTS_KEY);
|
||||
}
|
||||
|
||||
async function ensureFilePermissions() {
|
||||
await callChannel(ENSURE_FILE_PERMISSIONS);
|
||||
}
|
||||
|
||||
// Note: will need to restart the app after calling this, to set up afresh
|
||||
async function removeOtherData() {
|
||||
await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user