Remove mkdirp
Fixes: https://github.com/webtorrent/webtorrent-desktop/issues/1831
This commit is contained in:
@@ -8,7 +8,6 @@ const cp = require('child_process')
|
||||
const electronPackager = require('electron-packager')
|
||||
const fs = require('fs')
|
||||
const minimist = require('minimist')
|
||||
const mkdirp = require('mkdirp')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const rimraf = require('rimraf')
|
||||
@@ -457,13 +456,13 @@ function buildWin32 (cb) {
|
||||
console.log('Windows: Creating portable app...')
|
||||
|
||||
const portablePath = path.join(filesPath, 'Portable Settings')
|
||||
mkdirp.sync(portablePath)
|
||||
fs.mkdirSync(portablePath, { recursive: true })
|
||||
|
||||
const downloadsPath = path.join(portablePath, 'Downloads')
|
||||
mkdirp.sync(downloadsPath)
|
||||
fs.mkdirSync(downloadsPath, { recursive: true })
|
||||
|
||||
const tempPath = path.join(portablePath, 'Temp')
|
||||
mkdirp.sync(tempPath)
|
||||
fs.mkdirSync(tempPath, { recursive: true })
|
||||
|
||||
const inPath = path.join(DIST_PATH, path.basename(filesPath))
|
||||
const outPath = path.join(DIST_PATH, BUILD_NAME + '-win.zip')
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
"languagedetect": "^2.0.0",
|
||||
"location-history": "^1.1.2",
|
||||
"material-ui": "^0.20.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
"music-metadata": "6.3.6",
|
||||
"network-address": "^1.1.2",
|
||||
"parse-torrent": "^7.1.3",
|
||||
|
||||
@@ -7,7 +7,6 @@ const util = require('util')
|
||||
const defaultAnnounceList = require('create-torrent').announceList
|
||||
const electron = require('electron')
|
||||
const fs = require('fs')
|
||||
const mkdirp = require('mkdirp')
|
||||
const mm = require('music-metadata')
|
||||
const networkAddress = require('network-address')
|
||||
const path = require('path')
|
||||
@@ -216,7 +215,7 @@ function saveTorrentFile (torrentKey) {
|
||||
}
|
||||
|
||||
// Otherwise, save the .torrent file, under the app config folder
|
||||
mkdirp(config.TORRENT_PATH, function (_) {
|
||||
fs.mkdir(config.TORRENT_PATH, { recursive: true }, function (_) {
|
||||
fs.writeFile(torrentPath, torrent.torrentFile, function (err) {
|
||||
if (err) return console.log('error saving torrent file %s: %o', torrentPath, err)
|
||||
console.log('saved torrent file %s', torrentPath)
|
||||
@@ -233,7 +232,7 @@ function generateTorrentPoster (torrentKey) {
|
||||
torrentPoster(torrent, function (err, buf, extension) {
|
||||
if (err) return console.log('error generating poster: %o', err)
|
||||
// save it for next time
|
||||
mkdirp(config.POSTER_PATH, function (err) {
|
||||
fs.mkdir(config.POSTER_PATH, { recursive: true }, function (err) {
|
||||
if (err) return console.log('error creating poster dir: %o', err)
|
||||
const posterFileName = torrent.infoHash + extension
|
||||
const posterFilePath = path.join(config.POSTER_PATH, posterFileName)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const Application = require('spectron').Application
|
||||
const { copyFileSync } = require('fs')
|
||||
const fs = require('fs')
|
||||
const mkdirp = require('mkdirp')
|
||||
const parseTorrent = require('parse-torrent')
|
||||
const path = require('path')
|
||||
const PNG = require('pngjs').PNG
|
||||
@@ -158,8 +157,8 @@ function compareIgnoringTransparency (bufActual, bufExpected) {
|
||||
function resetTestDataDir () {
|
||||
rimraf.sync(config.TEST_DIR)
|
||||
// Create TEST_DIR as well as /Downloads and /Desktop
|
||||
mkdirp.sync(config.TEST_DIR_DOWNLOAD)
|
||||
mkdirp.sync(config.TEST_DIR_DESKTOP)
|
||||
fs.mkdirSync(config.TEST_DIR_DOWNLOAD, { recursive: true })
|
||||
fs.mkdirSync(config.TEST_DIR_DESKTOP, { recursive: true })
|
||||
}
|
||||
|
||||
function deleteTestDataDir () {
|
||||
|
||||
Reference in New Issue
Block a user