Allow gzipped disk images

This commit is contained in:
Jeff Parsons 2015-11-08 10:30:47 -08:00
commit 231bc201e7
7 changed files with 41 additions and 42 deletions

View file

@ -252,7 +252,7 @@ function Computer(parmsComputer, parmsMachine, fSuspended) {
if (!sStatePath) {
this.setReady();
} else {
web.loadResource(sStatePath, true, null, this, this.onLoadSetReady);
web.loadResource(sStatePath, true, null, this, this.doneLoad);
}
if (!fSuspended) {
@ -321,20 +321,20 @@ Computer.prototype.getUserID = function()
};
/**
* onLoadSetReady(sStateFile, sStateData, nErrorCode)
* doneLoad(sURL, sStateData, nErrorCode)
*
* @this {Computer}
* @param {string} sStateFile
* @param {string} sURL
* @param {string} sStateData
* @param {number} nErrorCode
*/
Computer.prototype.onLoadSetReady = function(sStateFile, sStateData, nErrorCode)
Computer.prototype.doneLoad = function(sURL, sStateData, nErrorCode)
{
if (!nErrorCode) {
this.sStateData = sStateData;
this.fStateData = true;
if (DEBUG && this.messageEnabled()) {
this.printMessage("loaded state file " + sStateFile.replace(this.sUserID || "xxx", "xxx"));
this.printMessage("loaded state file " + sURL.replace(this.sUserID || "xxx", "xxx"));
}
} else {
this.sResumePath = null;