mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 15:25:47 +01:00
Images do not show updated when changed on disk (fixes #7951)
This commit is contained in:
@@ -16,6 +16,7 @@ export class BinaryEditorModel extends EditorModel {
|
||||
private name: string;
|
||||
private resource: URI;
|
||||
private size: number;
|
||||
private etag: string;
|
||||
|
||||
constructor(
|
||||
resource: URI,
|
||||
@@ -49,8 +50,16 @@ export class BinaryEditorModel extends EditorModel {
|
||||
return this.size;
|
||||
}
|
||||
|
||||
/**
|
||||
* The etag of the binary file if known.
|
||||
*/
|
||||
public getETag(): string {
|
||||
return this.etag;
|
||||
}
|
||||
|
||||
public load(): TPromise<EditorModel> {
|
||||
return this.fileService.resolveFile(this.resource).then(stat => {
|
||||
this.etag = stat.etag;
|
||||
this.size = stat.size;
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user