Tolerate UNKNOWN errors in files.statOrNull on Windows.

Fixes #7243.
This commit is contained in:
Ben Newman
2016-06-21 13:40:09 -04:00
parent d60a0b90ee
commit 7ea260dac2

View File

@@ -262,7 +262,9 @@ files.statOrNull = function (path) {
try {
return files.stat(path);
} catch (e) {
if (e.code == "ENOENT") {
if (e.code === "ENOENT" ||
(process.platform === "win32" &&
e.code === "UNKNOWN")) {
return null;
}
throw e;