Re: FTP synch broken?
Julien Liebert <[email protected]>
| Newsgroups | gmane.comp.web.sitecopy |
|---|---|
| Message-ID | <[email protected]> |
Joe Orton wrote: >On Tue, Oct 26, 2004 at 09:39:45AM +0100, Chris Wilson wrote: > > >>Hi Julien, >> >> >> >>>True, but I have post a patch on this mailing list for 0.13.4 to handle >>>buggy/restricted FTP server >>>that not handle -R option, I'm currently updating it for 0.14.2 ... >>> >>> >>Thanks! I was going to ask for that to be added as a feature. Joe, please >>would you consider merging it into sitecopy? vsftpd, the standard ftpd on >>Red Hat/Fedora, does not appear to support -R properly. >> >> > >Yes, I'll certainly look at the patch, this should be simpler to do >properly now in 0.14.x now the LIST parsing code has been abstracted >out. > > To do it properly you need a stack. Push the first directory in the stack. For each directory found with 'ls -la' without -R push push it in the stack. pop the directory from the stack an loop until the stack is empty. My patch use a recursive method that produce strange debugging output (but work) and if I use the same method on 1.4, I have some trouble with the base directory. The stack method permit to do all the stuff in one simple function and not reopening FTP session for each listing. Add a ftp flag norecursive/recursive that permit to user to specify which method use, with -R or without -R. And put by default with -R. And to autodetecting, if you find a directory and you get any subdirectory with -R flag you can implicitely disable -R flag and start a manual crawling of subdirectory. Julien >joe >_______________________________________________ >sitecopy maillist - [email protected] >http://dav.lyra.org/mailman/listinfo/sitecopy > > > _______________________________________________ sitecopy maillist - [email protected] http://dav.lyra.org/mailman/listinfo/sitecopy