system and extension chunking fixes

This commit is contained in:
April Ayres-Griffiths 2018-06-20 15:58:25 +10:00
parent 0a4cc590d8
commit 358c50662f

View File

@ -1105,7 +1105,9 @@ func shellPut(args []string) int {
addrStr := m[0][2]
addr, _ = strconv.ParseInt(addrStr, 0, 32)
} else {
name = strings.Replace(name, "."+ext, "", -1)
//name = strings.Replace(name, "."+ext, "", -1)
l := len(ext) + 1
name = name[:len(name)-l]
}
kind = disk.AppleDOSFileTypeFromExt(ext)
@ -1143,11 +1145,18 @@ func shellPut(args []string) int {
addrStr := m[0][2]
addr, _ = strconv.ParseInt(addrStr, 0, 32)
} else {
name = strings.Replace(name, "."+ext, "", -1)
l := len(ext) + 1
name = name[:len(name)-l]
}
kind := disk.ProDOSFileTypeFromExt(ext)
if strings.ToLower(ext) == "system" {
name += "." + ext
ext = ""
kind = disk.ProDOSFileTypeFromExt("SYS")
}
if strings.HasSuffix(args[0], ".INT.ASC") {
kind = disk.FileType_PD_INT
} else if strings.HasSuffix(args[0], ".APP.ASC") {