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:
parent
1a9ab9629b
commit
7f6f9e7bbd
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user