Ensure proper file permissions on startup
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
6b56dd4ce0
commit
8d9ccd3c0a
10 changed files with 289 additions and 24 deletions
|
@ -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([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue