On Sun, Jan 05, 2003 at 04:30:47AM +0100, Hendrik Sattler wrote:
> I use the fish protocol with "mirror -R". But it has one problem: I also have
> hidden files (actually only .htaccess). Those get uploaded _every_ time. This
> also avoids deletion of dot files on the remote side. Any recommendations?
> With ftp protocol, this behaviour was also the default. There
> ftp:list-options -a
> solved the problem for me.
Attached patch will solve the problem. It is optional for ftp, because it is
not certain that ftp server supports -a option.
> 3.
> - -d might have brought some light a little bit earlier to me. Any reason why it
> is not available with -f ?
This was easy to add. The patch adds -d option for -f and -c.
> 4.
> Is there a way to have the file structure cache _between_ sessions? This would
> really speed up things and my mashine is really the only one changing the
> remote source. This was one of the great things with sitecopy.
Do you mean disk cacne of directory listings? I was thinking about it, but
have not implemented because I have not found enough motivation.
--
Alexander. | http://www.yars.free.net/~lav/
Index: Fish.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/Fish.cc,v
retrieving revision 1.40
diff -u -p -r1.40 Fish.cc
--- Fish.cc 2002/12/10 11:02:33 1.40
+++ Fish.cc 2003/01/05 07:34:16
@@ -511,7 +511,7 @@ void Fish::SendMethod()
if(!encode_file)
e=file;
Send("#LIST %s\n"
- "ls -l %s; echo '### 200'\n",e,e);
+ "ls -la %s; echo '### 200'\n",e,e);
PushExpect(EXPECT_DIR);
real_pos=0;
break;
@@ -519,7 +519,7 @@ void Fish::SendMethod()
if(!encode_file)
e=file;
Send("#LIST %s\n"
- "ls %s; echo '### 200'\n",e,e);
+ "ls -a %s; echo '### 200'\n",e,e);
PushExpect(EXPECT_DIR);
real_pos=0;
break;
Index: commands.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/commands.cc,v
retrieving revision 1.187
diff -u -p -r1.187 commands.cc
--- commands.cc 2002/09/02 11:05:31 1.187
+++ commands.cc 2003/01/05 08:11:25
@@ -642,6 +642,7 @@ Job *CmdExec::builtin_lftp()
int c;
const char *cmd=0;
char *acmd;
+ bool debug=false;
static struct option lftp_options[]=
{
{"help",no_argument,0,'h'},
@@ -651,7 +652,7 @@ Job *CmdExec::builtin_lftp()
args->rewind();
opterr=false;
- while((c=args->getopt_long("+f:c:vh",lftp_options,0))!=EOF)
+ while((c=args->getopt_long("+f:c:vhd",lftp_options,0))!=EOF)
{
switch(c)
{
@@ -673,12 +674,19 @@ Job *CmdExec::builtin_lftp()
sprintf(acmd,"%s\n\n",optarg);
cmd=acmd;
break;
+ case('d'):
+ debug=true;
+ break;
}
}
opterr=true;
if(cmd)
+ {
PrependCmd(cmd);
+ if(debug)
+ PrependCmd("debug;");
+ }
if(Done() && lftp_feeder) // no feeder and no commands
{