summaryrefslogtreecommitdiffhomepage
path: root/app/lib/tempdir.js
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-06-01 16:13:10 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-06-05 12:11:55 +0200
commitca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087 (patch)
treeb1f7754eb50896ab3681e35fa4e08be642b940c9 /app/lib/tempdir.js
parent5852c980980de53e00d76a0bdb4b41bf5c0f5b39 (diff)
downloadmullvadvpn-ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087.tar.xz
mullvadvpn-ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087.zip
Add formatted source code
Diffstat (limited to 'app/lib/tempdir.js')
-rw-r--r--app/lib/tempdir.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/app/lib/tempdir.js b/app/lib/tempdir.js
index e9f65cd03b..a3b4fa6d89 100644
--- a/app/lib/tempdir.js
+++ b/app/lib/tempdir.js
@@ -3,19 +3,19 @@
import path from 'path';
export function getSystemTemporaryDirectory() {
- switch(process.platform) {
- case 'win32': {
- const windowsPath = process.env.windir;
- if(windowsPath) {
- return path.join(windowsPath, 'Temp');
- } else {
- throw new Error('Missing windir in environment variables.');
+ switch (process.platform) {
+ case 'win32': {
+ const windowsPath = process.env.windir;
+ if (windowsPath) {
+ return path.join(windowsPath, 'Temp');
+ } else {
+ throw new Error('Missing windir in environment variables.');
+ }
}
- }
- case 'darwin':
- case 'linux':
- return '/tmp';
- default:
- throw new Error(`Not implemented for ${process.platform}`);
+ case 'darwin':
+ case 'linux':
+ return '/tmp';
+ default:
+ throw new Error(`Not implemented for ${process.platform}`);
}
}