1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-10-02 05:56:04 +00:00

Fix filefrompath()

This commit is contained in:
David Schmenk 2022-12-31 14:57:08 -08:00
parent 602fd75509
commit bba4570a93

View File

@ -16,7 +16,7 @@ res[t_fileinfo] srcfileinfo, dstfileinfo
//
def pathcpy(dst, src)#0
byte i, chr
if ^src
for i = 1 to ^src
chr = src->[i]
@ -52,7 +52,7 @@ end
def pathdiff(path1, path2)#1
byte i, d
char[64] abs1, abs2
abspath(@abs1, path1)
abspath(@abs2, path2)
@ -69,8 +69,8 @@ def pathdiff(path1, path2)#1
end
def filefrompath(filestr, pathstr)#0
byte i
for i = ^pathstr + 1 downto 1
for i = ^pathstr downto 1
if pathstr->[i] == '/'
break
fin
@ -108,7 +108,7 @@ def copyfiles(srcfile, dstfile)#0
char[64] srcfilepath
char[64] dstfilepath
char[16] wildname
//
// Check if copying a directory
//
@ -186,7 +186,7 @@ def copyfiles(srcfile, dstfile)#0
puts(" ==> "); puts(@dstfilepath); putln
fin
entry = entry + t_fileentry
entrycnt--
entrycnt--
loop
heaprelease(entrylist)
fin