diff --git a/controllers/sync_module_worker.js b/controllers/sync_module_worker.js index 859266a75..0e7a43601 100644 --- a/controllers/sync_module_worker.js +++ b/controllers/sync_module_worker.js @@ -1311,7 +1311,8 @@ SyncModuleWorker.prototype._syncOneVersion = function *(versionIndex, sourcePack var that = this; var username = this.username; var downurl = sourcePackage.dist.tarball; - var filename = path.basename(downurl); + var urlobj = urlparse(downurl); + var filename = path.basename(urlobj.pathname); var filepath = common.getTarballFilepath(filename); var ws = fs.createWriteStream(filepath);