lftp/lftp-4.0.9-mirror302-2.patch
Tomas Hozza 690e4622db Fix mirror when there are multiple 302 redirections
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2015-01-13 12:04:02 +01:00

36 lines
972 B
Diff

From b06344f2da1dfc68b1aa06e8186af174776f363b Mon Sep 17 00:00:00 2001
From: "Alexander V. Lukyanov" <lavv17f@gmail.com>
Date: Tue, 13 Jan 2015 09:13:36 +0300
Subject: [PATCH] mirror: use directory path when the index is a file (after
redirect).
---
src/MirrorJob.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/MirrorJob.cc b/src/MirrorJob.cc
index 54b1465..7f89e11 100644
--- a/src/MirrorJob.cc
+++ b/src/MirrorJob.cc
@@ -773,7 +773,7 @@ int MirrorJob::Do()
if(source_session->IsOpen())
return m;
- source_dir.set(source_session->GetCwd());
+ source_dir.set(source_session->GetCwd().GetDirectory());
pre_MAKE_TARGET_DIR:
{
@@ -856,7 +856,7 @@ int MirrorJob::Do()
return m;
create_target_dir=false;
- target_dir.set(target_session->GetCwd());
+ target_dir.set(target_session->GetCwd().GetDirectory());
pre_GETTING_LIST_INFO:
set_state(GETTING_LIST_INFO);
--
2.1.0