From 95e53b9549a76f3c9371f293dd81480713091e34 Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Mon, 7 Sep 2020 16:06:25 -0400 Subject: [PATCH] Fixed bug where unix paths would improperly parsed while importing unregistered files --- backend/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/utils.js b/backend/utils.js index f815c6c..73156f3 100644 --- a/backend/utils.js +++ b/backend/utils.js @@ -28,7 +28,7 @@ function getDownloadedFilesByType(basePath, type) { var located_files = recFindByExt(basePath, ext); for (let i = 0; i < located_files.length; i++) { let file = located_files[i]; - var file_path = file.substring(basePath.length+1, file.length); + var file_path = file.substring(basePath.includes('\\') ? basePath.length+1 : basePath.length, file.length); var stats = fs.statSync(file);