mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Give POSIX paths without drive letters to glob on Windows.
This commit is contained in:
@@ -80,6 +80,18 @@ _.extend(LocalCatalog.prototype, {
|
||||
}
|
||||
|
||||
patterns.forEach(pattern => {
|
||||
if (process.platform === "win32") {
|
||||
pattern = files.convertToOSPath(pattern);
|
||||
|
||||
if (pattern.charAt(1) === ":") {
|
||||
// Get rid of drive prefix, e.g. C:
|
||||
pattern = pattern.slice(2);
|
||||
}
|
||||
|
||||
// Convert to /forward/slash/path without /C
|
||||
pattern = files.convertToPosixPath(pattern, true);
|
||||
}
|
||||
|
||||
// Note: glob expects POSIX-style paths, even on Windows.
|
||||
// https://github.com/isaacs/node-glob/blob/master/README.md#windows
|
||||
glob(pattern).forEach(
|
||||
|
||||
Reference in New Issue
Block a user