mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Fix logical→physical path conversion for absolute paths
This commit is contained in:
@@ -22,7 +22,7 @@ function translatePath (file) {
|
||||
if (typeof importPaths === "string") {
|
||||
// Substitute the root for the real physical path
|
||||
// NOTE: `root` deals with import_paths not being absolute
|
||||
const prefix = Path.resolve(Path.join(root, importPaths));
|
||||
const prefix = Path.resolve(root, importPaths);
|
||||
const suffix = Path.resolve(file).replace(/^\/+/, "");
|
||||
const physicalPath = Path.resolve(Path.join(prefix, suffix));
|
||||
return validate(physicalPath, prefix);
|
||||
|
||||
Reference in New Issue
Block a user