mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 05:38:12 +00:00
Support additional sticker states
Co-authored-by: scott@signal.org Co-authored-by: ken@signal.org
This commit is contained in:
committed by
Scott Nonnenberg
parent
41880cfe66
commit
be5d0837f8
@@ -20,6 +20,8 @@ import mkdirp from 'mkdirp';
|
||||
import rimraf from 'rimraf';
|
||||
import { app, BrowserWindow, dialog } from 'electron';
|
||||
|
||||
import { getTempPath } from '../../app/attachments';
|
||||
|
||||
// @ts-ignore
|
||||
import * as packageJson from '../../package.json';
|
||||
import { getSignatureFileName } from './signature';
|
||||
@@ -269,7 +271,7 @@ function getGotOptions(): GotOptions<null> {
|
||||
|
||||
function getBaseTempDir() {
|
||||
// We only use tmpdir() when this code is run outside of an Electron app (as in: tests)
|
||||
return app ? join(app.getPath('userData'), 'temp') : tmpdir();
|
||||
return app ? getTempPath(app.getPath('userData')) : tmpdir();
|
||||
}
|
||||
|
||||
export async function createTempDir() {
|
||||
@@ -303,11 +305,6 @@ export function getPrintableError(error: Error) {
|
||||
return error && error.stack ? error.stack : error;
|
||||
}
|
||||
|
||||
export async function deleteBaseTempDir() {
|
||||
const baseTempDir = getBaseTempDir();
|
||||
await rimrafPromise(baseTempDir);
|
||||
}
|
||||
|
||||
export function getCliOptions<T>(options: any): T {
|
||||
const parser = createParser({ options });
|
||||
const cliOptions = parser.parse(process.argv);
|
||||
|
||||
Reference in New Issue
Block a user