mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-24 04:30:53 -06:00
add check if expected directory path is non-empty string
This commit is contained in:
parent
53232b9680
commit
2a206b3dd7
@ -611,7 +611,7 @@ namespace ts {
|
||||
const originalWriteFile = sys.writeFile;
|
||||
sys.writeFile = function(path, data, writeBom) {
|
||||
const directoryPath = getDirectoryPath(normalizeSlashes(path));
|
||||
if (!sys.directoryExists(directoryPath)) {
|
||||
if (directoryPath && !sys.directoryExists(directoryPath)) {
|
||||
recursiveCreateDirectory(directoryPath, sys);
|
||||
}
|
||||
originalWriteFile.call(sys, path, data, writeBom);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user