Images do not show updated when changed on disk (fixes #7951)

This commit is contained in:
Benjamin Pasero
2016-09-03 08:45:13 +02:00
parent 94f66bad46
commit 4f21084c3c
4 changed files with 40 additions and 49 deletions
@@ -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;