diff --git a/src/utilsrc/apple/copy.pla b/src/utilsrc/apple/copy.pla index e77256d..d74d2be 100644 --- a/src/utilsrc/apple/copy.pla +++ b/src/utilsrc/apple/copy.pla @@ -9,6 +9,7 @@ var arg, exit, srcfilelist, srcfileptr, srccnt var copybuff, copyrel, copysize byte recurse, dstlen char[64] curpath, dstpath +char[16] srcdir res[t_fileinfo] srcfileinfo, dstfileinfo // // Copy path with upper case conversion @@ -245,11 +246,18 @@ if not except(exit) // srcfileptr = srcfilelist while srccnt + dstlen = dstpath if fileio:getfileinfo(srcfileptr, @srcfileinfo) == FILE_ERR_OK and srcfileinfo.file_type == $0F if recurse // // Copy directory // + if dstpath[dstpath] <> '/' + dstpath++ + dstpath[dstpath] = '/' + fin + filefrompath(@srcdir, srcfileptr) + strcat(@dstpath, @srcdir) if fileio:getfileinfo(@dstpath, @dstfileinfo) <> FILE_ERR_OK fileio:create(@dstpath, $0F, $0000) fin @@ -268,6 +276,7 @@ if not except(exit) // Copy files // copyfiles(srcfileptr, @dstpath) + dstpath = dstlen srcfileptr = srcfileptr + ^srcfileptr + 1 srccnt-- loop