qjebbs / vscode-plantuml

Rich PlantUML support for Visual Studio Code.
MIT License
1.09k stars 155 forks source link

[Bugfix] Skip workspace folders where no diagramsRoot folder exist #590

Open SinTh0r4s opened 3 months ago

SinTh0r4s commented 3 months ago

I have a project where I use your extension to generate my diagrams. It is really convenient. Thanks for developing it <3

My project contains several workspace folders, but my documentation is only located in the one folder. This leads to a crash: Error: ENOENT: no such file or directory, stat '<workspace_folder>\<diagramsRoot>'

It is the same issue referred to here: #414

This PR adds a simple check to only search for diagrams if the diagramsRoot exists in the workspace folder.

It is currently only possible to check the entire project for diagrams by leaving diagramsRoot empty, but my repo is large and it takes a minute to scan. I'd really love to have this small improvement as it would speed up my workflow.

Cheers, Sin