提交 6fe06f07 编写于 作者: B Benjamin Pasero

icons: new folder shows as file

上级 10458b83
......@@ -316,7 +316,7 @@ export class FileRenderer extends ActionsRenderer implements IRenderer {
// Item Container
let item = $('.explorer-item');
if (stat.isDirectory) {
if (stat.isDirectory || (stat instanceof NewStatPlaceholder && stat.isDirectoryPlaceholder())) {
item.addClass('folder-icon');
} else {
item.addClass(...this.fileIconClasses(stat.resource.fsPath));
......
......@@ -302,12 +302,14 @@ export class NewStatPlaceholder extends FileStat {
private static ID = 0;
private id: number;
private directoryPlaceholder: boolean;
constructor(isDirectory: boolean) {
super(URI.file(''));
this.id = NewStatPlaceholder.ID++;
this.isDirectoryResolved = isDirectory;
this.directoryPlaceholder = isDirectory;
}
public destroy(): void {
......@@ -325,6 +327,10 @@ export class NewStatPlaceholder extends FileStat {
return 'new-stat-placeholder:' + this.id + ':' + this.parent.resource.toString();
}
public isDirectoryPlaceholder(): boolean {
return this.directoryPlaceholder;
}
/**
* Returns a deep copy of this model object.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册