From e208074ef4c240fe03e4147ab097ec3b52b97619 Mon Sep 17 00:00:00 2001 From: timothycarambat <rambat1010@gmail.com> Date: Wed, 22 May 2024 11:50:01 -0500 Subject: [PATCH] patch path normalization --- collector/utils/files/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/utils/files/index.js b/collector/utils/files/index.js index 9b56bb5b4..51d0a6823 100644 --- a/collector/utils/files/index.js +++ b/collector/utils/files/index.js @@ -122,7 +122,7 @@ function isWithin(outer, inner) { function normalizePath(filepath = "") { const result = path - .normalize(filepath.trim()) + .normalize(filepath.replace(/\s/g, "-").trim()) .replace(/^(\.\.(\/|\\|$))+/, "") .trim(); if (["..", ".", "/"].includes(result)) throw new Error("Invalid path.");