add check if expected directory path is non-empty string
This commit is contained in:
parent
53232b9680
commit
2a206b3dd7
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue