From 31873bc2d292026838a06e7de384680135b7b4cf Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 22 May 2024 20:24:22 +0200 Subject: [PATCH] #809 - Fix retrieving the `filePrefix` when updating the file name on slug change --- CHANGELOG.md | 1 + src/helpers/ArticleHelper.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4765b56..0431aaf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - [#801](https://github.com/estruyf/vscode-front-matter/issues/801): Faster folder processing on updates - [#804](https://github.com/estruyf/vscode-front-matter/issues/804): Fix blinking of the front matter content area - [#806](https://github.com/estruyf/vscode-front-matter/issues/804): Fix preview URL for `index.md` files in root of the page folder path +- [#809](https://github.com/estruyf/vscode-front-matter/issues/809): Fix retrieving the `filePrefix` when updating the file name on slug change ## [10.1.0] - 2024-04-11 - [Release notes](https://beta.frontmatter.codes/updates/v10.1.0) diff --git a/src/helpers/ArticleHelper.ts b/src/helpers/ArticleHelper.ts index 0b9391a6..f9c1eb6b 100644 --- a/src/helpers/ArticleHelper.ts +++ b/src/helpers/ArticleHelper.ts @@ -602,7 +602,7 @@ export class ArticleHelper { // Retrieve the file prefix from the folder if (filePath) { - const filePrefixOnFolder = await Folders.getFilePrefixByFolderPath(filePath); + const filePrefixOnFolder = await Folders.getFilePrefixBeFilePath(filePath); if (typeof filePrefixOnFolder !== 'undefined') { prefix = filePrefixOnFolder; }