diff --git a/src/plantuml/exporter/exportWorkSpace.ts b/src/plantuml/exporter/exportWorkSpace.ts index fb4afa9..a5cc08f 100644 --- a/src/plantuml/exporter/exportWorkSpace.ts +++ b/src/plantuml/exporter/exportWorkSpace.ts @@ -50,7 +50,10 @@ async function getFileList(para?): Promise { if (!para) { for (let folder of vscode.workspace.workspaceFolders) { - _files.push(...await getFileList(config.diagramsRoot(folder.uri))); + const path = config.diagramsRoot(folder.uri); + if (fs.existsSync(path.fsPath)) { + _files.push(...await getFileList(path)); + } } } else if (para instanceof Array) { for (let u of para.filter(p => p instanceof vscode.Uri)) { @@ -137,4 +140,4 @@ function doBuild(files: FileAndFormat[]) { } } ); -} \ No newline at end of file +}