mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-03-20 03:31:27 +00:00
Fix filefrompath()
This commit is contained in:
parent
602fd75509
commit
bba4570a93
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user