1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-11-02 13:08:13 +00:00

Fix directory creation ops

This commit is contained in:
Dave Schmenk 2019-12-06 10:23:38 -08:00
parent 1a9ab9629b
commit 7f6f9e7bbd
2 changed files with 15 additions and 2 deletions

View File

@ -271,7 +271,7 @@ def a2create(path, type, aux)
params.3 = $C3
params.4 = type
params:5 = aux
params.7 = $1
params.7 = type == $0F ?? $0D :: $01
params:8 = 0
params:10 = 0
perr = syscall($C0, @params)
@ -284,9 +284,10 @@ def a3create(path, type, aux)
params.0 = 3
params:1 = path
params:3 = @options
params.5 = 3
params.5 = 4
options.0 = type
options:1 = aux
options.3 = type == $0F ?? $0D :: $01
perr = syscall($C0, @params)
return perr
end

View File

@ -260,6 +260,7 @@ def writeUDP(ipsrc, portsrc, data, len, param)
end
def servUDP(ipsrc, portsrc, data, len, param)
byte info[24]
byte l, prefix[48]
when *data
is RRQ // Read request
@ -317,6 +318,17 @@ def servUDP(ipsrc, portsrc, data, len, param)
// Extract filename
//
netscii, type, aux = mkProName(data + 2, @filename)
//
// Scan filename prefix and create
//
prefix[1] = filename[1]
for l = 2 to filename[0]
if filename[l] == '/'
prefix[0] = l-1
fileio:create(@prefix, $0F, $0000)
fin
prefix[l] = filename[l]
next
fileio:destroy(@filename)
if fileio:create(@filename, type, aux)
puts("Create file error: "); putb(perr); putln