From b17dc8822c398b62e2b6223c8cec9d993490d265 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Tue, 22 Aug 2017 20:07:41 -0600 Subject: [PATCH] Fixed issue arising from uploading missions to a server with multi-partitions --- lib/missions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/missions.js b/lib/missions.js index 8f6cfba..11247bf 100644 --- a/lib/missions.js +++ b/lib/missions.js @@ -1,6 +1,6 @@ var async = require('async'); var filesize = require('filesize'); -var fs = require('fs'); +var fs = require ('fs.extra'); var path = require('path'); var SteamWorkshop = require('steam-workshop'); @@ -48,7 +48,7 @@ Missions.prototype.list = function (cb){ Missions.prototype.handleUpload = function (uploadedFile, cb) { var filename = decodeURI(uploadedFile.originalname.toLowerCase()); - fs.rename(uploadedFile.path, path.join(this.missionsPath(), filename), function (err) { + fs.move (uploadedFile.path, path.join(this.missionsPath(), filename), function (err) { cb(err); }); };