Fix #131809

上级 214ac689
...@@ -465,7 +465,10 @@ export class GettingStartedPage extends EditorPane { ...@@ -465,7 +465,10 @@ export class GettingStartedPage extends EditorPane {
const generalizedLocale = locale?.replace(/-.*$/, ''); const generalizedLocale = locale?.replace(/-.*$/, '');
const generalizedLocalizedPath = path.with({ path: path.path.replace(/\.md$/, `.nls.${generalizedLocale}.md`) }); const generalizedLocalizedPath = path.with({ path: path.path.replace(/\.md$/, `.nls.${generalizedLocale}.md`) });
const fileExists = (file: URI) => this.fileService.resolve(file).then(() => true).catch(() => false); const fileExists = (file: URI) => this.fileService
.resolve(file, { resolveMetadata: true })
.then((stat) => !!stat.size) // Double check the file actually has content for fileSystemProviders that fake `stat`. #131809
.catch(() => false);
const [localizedFileExists, generalizedLocalizedFileExists] = await Promise.all([ const [localizedFileExists, generalizedLocalizedFileExists] = await Promise.all([
fileExists(localizedPath), fileExists(localizedPath),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册