#621 - Create data file if it does not exist yet

This commit is contained in:
Elio Struyf
2023-08-20 11:11:16 +02:00
parent c47bc04510
commit a9bf770f26
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -52,6 +52,7 @@
- [#603](https://github.com/estruyf/vscode-front-matter/issues/603): Fix problem with page bundles and path placeholders
- [#617](https://github.com/estruyf/vscode-front-matter/issues/617): Fix insert media snippet dialog by using a slideover instead of a dialog
- [#620](https://github.com/estruyf/vscode-front-matter/issues/620): Fix in array field of data files
- [#621](https://github.com/estruyf/vscode-front-matter/issues/621): Create data file if it does not exist yet
## [8.4.0] - 2023-04-03 - [Release notes](https://beta.frontmatter.codes/updates/v8.4.0)
+2
View File
@@ -48,6 +48,8 @@ export class DataListener extends BaseListener {
if (!(await existsAsync(dirPath))) {
await mkdirAsync(dirPath, { recursive: true });
}
await writeFileAsync(absPath, '', 'utf8');
}
const fileContent = await readFileAsync(absPath, 'utf8');