提交 807f9d5c 编写于 作者: I isidor

explorer: root folders must be directories

fixes #46014
上级 634d73f9
......@@ -815,7 +815,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView
return this.fileService.resolveFiles(targetsToResolve).then(results => {
// Convert to model
const modelStats = results.map((result, index) => {
if (result.success) {
if (result.success && result.stat.isDirectory) {
return FileStat.create(result.stat, targetsToResolve[index].root, targetsToResolve[index].options.resolveTo);
}
......@@ -842,7 +842,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView
let delayer = new Delayer(100);
let delayerPromise: TPromise;
return TPromise.join(targetsToResolve.map((target, index) => this.fileService.resolveFile(target.resource, target.options)
.then(result => FileStat.create(result, target.root, target.options.resolveTo), err => errorFileStat(target.resource, target.root))
.then(result => result.isDirectory ? FileStat.create(result, target.root, target.options.resolveTo) : errorFileStat(target.resource, target.root), err => errorFileStat(target.resource, target.root))
.then(modelStat => {
// Subsequent refresh: Merge stat into our local model and refresh tree
if (index < this.model.roots.length) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册