diff --git a/src/config.js b/src/config.js index 19bd1ada..95e4c177 100644 --- a/src/config.js +++ b/src/config.js @@ -1,5 +1,6 @@ const appConfig = require('application-config')('WebTorrent') const fs = require('fs') +const os = require('os') const path = require('path') const electron = require('electron') @@ -9,7 +10,7 @@ const APP_VERSION = require('../package.json').version const IS_TEST = isTest() const PORTABLE_PATH = IS_TEST - ? path.join(__dirname, '../test/tempTestData') + ? path.join(process.platform === 'win32' ? os.tmpdir() : '/tmp', 'WebTorrentTest') : path.join(path.dirname(process.execPath), 'Portable Settings') const IS_PORTABLE = isPortable() const IS_PRODUCTION = isProduction() diff --git a/test/config.js b/test/config.js index e1a5dc1c..a99f5e2a 100644 --- a/test/config.js +++ b/test/config.js @@ -1,6 +1,7 @@ const path = require('path') +const os = require('os') -const TEST_DIR = path.join(__dirname, 'tempTestData') +const TEST_DIR = path.join(process.platform === 'win32' ? os.tmpdir() : '/tmp', 'WebTorrentTest') const TEST_DIR_DOWNLOAD = path.join(TEST_DIR, 'Downloads') const TEST_DIR_DESKTOP = path.join(TEST_DIR, 'Desktop') diff --git a/test/screenshots/darwin/create-torrent-advanced.png b/test/screenshots/darwin/create-torrent-advanced.png index 78aaad5e..f8055bc0 100644 Binary files a/test/screenshots/darwin/create-torrent-advanced.png and b/test/screenshots/darwin/create-torrent-advanced.png differ diff --git a/test/screenshots/darwin/create-torrent-simple.png b/test/screenshots/darwin/create-torrent-simple.png index 424130e9..529f57b5 100644 Binary files a/test/screenshots/darwin/create-torrent-simple.png and b/test/screenshots/darwin/create-torrent-simple.png differ diff --git a/test/screenshots/darwin/prefs-basic.png b/test/screenshots/darwin/prefs-basic.png index cf8d4e79..18736874 100644 Binary files a/test/screenshots/darwin/prefs-basic.png and b/test/screenshots/darwin/prefs-basic.png differ diff --git a/test/screenshots/darwin/torrent-list-download-path-missing.png b/test/screenshots/darwin/torrent-list-download-path-missing.png index dc01b9d8..30a93732 100644 Binary files a/test/screenshots/darwin/torrent-list-download-path-missing.png and b/test/screenshots/darwin/torrent-list-download-path-missing.png differ