lftp/lftp-3.4.2-fix-redirect-coredump.patch
2006-02-15 22:24:33 +00:00

19 lines
483 B
Diff

--- lftp-3.4.2/src/Http.cc.redirect_coredump 2006-02-06 05:57:25.000000000 -0500
+++ lftp-3.4.2/src/Http.cc 2006-02-15 16:19:23.000000000 -0500
@@ -1525,6 +1525,15 @@
}
if(mode==CHANGE_DIR)
{
+ if( new_cwd == 0L )
+ {
+ char *new_location = xstrdup(GetConnectURL());
+ xfree(location);
+ location=new_location;
+ SetError(FILE_MOVED);
+ state= DONE;
+ return MOVED;
+ }
cwd.Set(new_cwd);
state=DONE;
return MOVED;