mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-05 13:02:27 +02:00
#448 - Fix file retrieval
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
### ⚡️ Optimizations
|
||||
|
||||
- [#431](https://github.com/estruyf/vscode-front-matter/issues/431): Performance improvements for the content dashboard
|
||||
- [#448](https://github.com/estruyf/vscode-front-matter/issues/448): Retrieving files fails when content folder name and workspace folder name are the same
|
||||
|
||||
### 🐞 Fixes
|
||||
|
||||
|
||||
@@ -250,7 +250,10 @@ export class Folders {
|
||||
for (const folder of folders) {
|
||||
try {
|
||||
const projectName = Folders.getProjectFolderName();
|
||||
let projectStart = folder.path.split(projectName).pop();
|
||||
const slashSplit = parseWinPath(folder.path).split(`/`);
|
||||
const idx = slashSplit.findIndex(f => f === projectName);
|
||||
|
||||
let projectStart = `/${slashSplit.slice(idx + 1).join(`/`)}`;
|
||||
|
||||
if (projectStart) {
|
||||
projectStart = projectStart.replace(/\\/g, '/');
|
||||
|
||||
Reference in New Issue
Block a user