Remove path-exists

This package trivially wraps core node.js functionality. Let's do
without it.
This commit is contained in:
Feross Aboukhadijeh
2016-05-09 16:59:57 +02:00
parent 18b126e0d2
commit 98e263e69a
3 changed files with 13 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
var appConfig = require('application-config')('WebTorrent')
var fs = require('fs')
var path = require('path')
var pathExists = require('path-exists')
var APP_NAME = 'WebTorrent'
var APP_TEAM = 'The WebTorrent Project'
@@ -53,7 +53,11 @@ function getConfigPath () {
}
function isPortable () {
return process.platform === 'win32' && isProduction() && pathExists(PORTABLE_PATH)
try {
return process.platform === 'win32' && isProduction() && !!fs.statSync(PORTABLE_PATH)
} catch (err) {
return false
}
}
function isProduction () {