Fixed loading of older state files

This commit is contained in:
Jeff Parsons 2014-11-10 22:45:43 -08:00 • committed by jeffpar
commit ab5eb61b8d
11 changed files with 24 additions and 18 deletions

View file

@ -25,8 +25,9 @@
<manifest ref="/apps/pc/1981/visicalc/manifest.xml" disk="*"/>
<manifest ref="/apps/pc/1982/esuite/manifest.xml" disk="*"/>
</control>
<control type="button" class="input" binding="loadDrive">Load</control>
<control type="button" class="input" binding="loadDrive">Download</control>
<control type="description" class="output" binding="descDisk" padleft="8px"/>
<control type="file" class="input" binding="mountDrive" padtop="8px"/>
</fdc>
<chipset id="chipset" model="5160" sw1="01000001"/>
<hdc id="hdcXT" drives='[{name:"10Mb Hard Disk",type:3}]'/>

View file

@ -14,7 +14,7 @@
<control type="button" class="input" binding="run">Run</control>
</cpu>
<keyboard ref="/devices/pc/keyboard/minimal.xml"/>
<fdc id="fdcNEC" width="360px" pos="left" padleft="8px" padbottom="8px" automount='{A:{name:"PC-DOS 2.00 (Disk 1)",path:"/disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json"}, B:{name:"Executive Suite (1982)",path:"/apps/pc/1982/esuite/disk.json"}}'>
<fdc id="fdcNEC" pos="right" padleft="8px" padbottom="8px" automount='{A:{name:"PC-DOS 2.00 (Disk 1)",path:"/disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json"}, B:{name:"Executive Suite (1982)",path:"/apps/pc/1982/esuite/disk.json"}}'>
<control type="list" class="input" binding="listDrives"/>
<control type="list" class="input" binding="listDisks">
<disk path="">None</disk>
@ -25,8 +25,9 @@
<manifest ref="/apps/pc/1981/visicalc/manifest.xml" disk="*"/>
<manifest ref="/apps/pc/1982/esuite/manifest.xml" disk="*"/>
</control>
<control type="button" class="input" binding="loadDrive">Load</control>
<control type="description" class="output" binding="descDisk" padleft="8px"/>
<control type="button" class="input" binding="loadDrive" padright="8px">Download</control>
<control type="description" class="output" binding="descDisk" padright="8px"/>
<control type="file" class="input" binding="mountDrive"/>
</fdc>
<chipset id="chipset" model="5160" sw1="01000001"/>
<hdc id="hdcXT" drives='[{name:"10Mb Hard Disk",type:3}]'/>

View file

@ -7,7 +7,6 @@
<category>Operating System</category>
<author>Microsoft</author>
<releaseDate/>
<machine href="/devices/pc/machine/5160/cga/640kb/dos400m/machine.xml"/>
<disk id="disk01" size="368640" chs="40:2:9" img="private/MSDOS400M-DISK1.img" href="/disks/pc/dos/microsoft/4.0M/MSDOS400M-DISK1.json" md5="6349c61a7c74b0872a918d130c8080a4" md5json="e9db9a543fc26b5fc6c7c03586eb05b2">
<name>MS-DOS 4.0M (Disk 1)</name>
</disk>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<fdc id="fdcNEC" width="340px" pos="left" padleft="8px" padbottom="8px" automount='{A:{name:"PC-DOS 2.00 (Disk 1)",path:"/disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json"}, B:{name:"PC-DOS 2.00 (Disk 2)",path:"/disks/pc/dos/ibm/2.00/PCDOS200-DISK2.json"}}'>
<fdc id="fdcNEC" pos="left" padleft="8px" padbottom="8px" automount='{A:{name:"PC-DOS 2.00 (Disk 1)",path:"/disks/pc/dos/ibm/2.00/PCDOS200-DISK1.json"}, B:{name:"PC-DOS 2.00 (Disk 2)",path:"/disks/pc/dos/ibm/2.00/PCDOS200-DISK2.json"}}'>
<control type="list" class="input" binding="listDrives"/>
<control type="list" class="input" binding="listDisks">
<disk path="">None</disk>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -166,11 +166,15 @@ var aMachineFileTypes = {
var asNonDirectories = [
"COPYING",
"LICENSE",
"README"
"README",
"makefile"
];
var asExtsPlainText = [
"map"
"65v",
"bas",
"map",
"txt"
];
/*
@ -215,7 +219,6 @@ var asFilesNonServed = [
"debug",
"lib",
"logs",
"makefile",
"my_modules",
"node_modules",
"node.log",
@ -440,7 +443,7 @@ HTMLOut.filter = function(req, res, next)
var i;
var sPath = path.join(sServerRoot, req.path);
var sBaseName = path.basename(req.path);
var sBaseExt = ((i = sBaseName.lastIndexOf('.')) > 0? sBaseName.substr(i+1) : "");
var sBaseExt = ((i = sBaseName.lastIndexOf('.')) > 0? sBaseName.substr(i+1) : "").toLowerCase();
var sTrailingChar = req.path.slice(-1);
if (!fServerDebug && !net.hasParm(net.GORT_COMMAND, net.GORT_DEBUG, req)) {
@ -531,7 +534,7 @@ HTMLOut.filter = function(req, res, next)
* folders with trailing slashes.
*/
if (asNonDirectories.indexOf(sBaseName) < 0) {
if (sTrailingChar != '/' || sBaseName.match(/\.[^0-9]+[^Ma-z]?$/)) {
if (sTrailingChar != '/') {
HTMLOut.logDebug('HTMLOut.filter("' + sBaseName + '"): passing static file request to next()');
next();
return;
@ -1052,7 +1055,7 @@ HTMLOut.prototype.getDirList = function(sToken, sIndent, aParms)
var fDir = false;
if (sURL == '/' || sBaseName == "..") {
fDir = true;
} else if (asNonDirectories.indexOf(sBaseName) < 0 && (iExt < 0 || sBaseName.match(/\.[0-9]+[Ma-z]?$/))) {
} else if (asNonDirectories.indexOf(sBaseName) < 0 && (iExt < 0 || sBaseName.match(/\.[0-9]+[Ma-c]?$/))) {
fDir = true;
sURL += '/';
}

View file

@ -931,6 +931,8 @@ FDC.prototype.initDrive = function(drive, iDrive, data)
}
var deltas = data[i++];
if (deltas == 102) deltas = false; // v1.02 backward-compatibility
if (typeof deltas == "boolean") {
var fLocal = deltas;
var sDisketteName = data[i++];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long