NetTalk Central
NetTalk FTP => FTP - Ask For Help => Topic started by: Wolfgang Orth on August 27, 2007, 12:39:32 PM
-
Hello folks,
this is from the Nettalk.tpl.
BreakInDirToQ routine
data
RLoc:y long
RLoc:z long
code
!-- This routine makes a queue out of the subdirs where to place the logfiles.
!-- This is only necessary when the directory does not exist and needs to be created.
RLoc:y = 0
loop
RLoc:z = RLoc:y + 1
RLoc:y = instring('/',%FTPGroupPar.FTPDir,1,RLoc:z)
if (RLoc:y = 0) or ((RLoc:y > instring('\',%FTPGroupPar.FTPDir,1,RLoc:z)) and instring('\',%FTPGroupPar.FTPDir,1,RLoc:z)) then
RLoc:y = instring('\',%FTPGroupPar.FTPDir,1,RLoc:z)
end
...
What makes me wonder is why there is instring('/', but later its instring('\',,
I am just curious ;-)
Wolfgang
-
Hi Wolfgang,
It checks for both, first for a forward slash and then for a backslash if there is no forward slash. Note that it will break if you mix forward slashes and backslashes in a single directory specification, but that should never happen.
Regards,
Sean Cameron
CapeSoft
Work Smarter, Not Harder