Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/common.js')
-rw-r--r--test/common.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/common.js b/test/common.js
index 8c30686..6f2ce1e 100644
--- a/test/common.js
+++ b/test/common.js
@@ -3,11 +3,11 @@ const fs = require('fs')
const path = require('path')
exports.getDownloadPath = function (infix, infoHash) {
- let downloadPath
+ let tmpPath
try {
- downloadPath = path.join(fs.statSync('/tmp') && '/tmp', 'webtorrent', 'test')
+ tmpPath = path.join(fs.statSync('/tmp') && '/tmp')
} catch (err) {
- downloadPath = path.join(typeof os.tmpdir === 'function' ? os.tmpdir() : '/', 'webtorrent', 'test')
+ tmpPath = path.join(typeof os.tmpdir === 'function' ? os.tmpdir() : '/')
}
- return path.join(downloadPath, infix, infoHash)
+ return path.join(tmpPath, 'webtorrent', 'test', infix, infoHash)
}