From cff71e4806c9a2cac08eccc04e685b2153a24cb8 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Wed, 17 May 2017 20:56:30 +0200 Subject: [PATCH] Path normalization --- src/package-transpilation-registry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/package-transpilation-registry.js b/src/package-transpilation-registry.js index 83b2ce2f6..6f6fe2b13 100644 --- a/src/package-transpilation-registry.js +++ b/src/package-transpilation-registry.js @@ -32,10 +32,10 @@ class PackageTranspilationRegistry { console.log(">>>>> REMOVING: " + packagePath) delete this.configByPackagePath[packagePath] const packagePathWithSep = packagePath.endsWith(path.sep) ? - packagePath : packagePath + path.sep; + path.join(packagePath) : path.join(packagePath) + path.sep; Object.keys(this.specByFilePath).forEach(filePath => { console.log('checking if ' + filePath + ' starts with ' + packagePathWithSep) - if (filePath.startsWith(packagePathWithSep)) { + if (path.join(filePath).startsWith(packagePathWithSep)) { console.log(' >> REMOVING ' + filePath) delete this.specByFilePath[filePath] }