Blame SOURCES/lftp-4.4.8-mirror302-2.patch

373a02
From 0f7273a52b4158c7193e44b128a9e54db74c7979 Mon Sep 17 00:00:00 2001
373a02
From: "Alexander V. Lukyanov" <lavv17f@gmail.com>
373a02
Date: Wed, 1 Apr 2015 16:00:52 +0300
373a02
Subject: [PATCH] mirror: fixed redirection to a file with full URL.
373a02
373a02
---
373a02
 src/MirrorJob.cc | 5 +++--
373a02
 1 file changed, 3 insertions(+), 2 deletions(-)
373a02
373a02
diff --git a/src/MirrorJob.cc b/src/MirrorJob.cc
373a02
index 7f89e11..ef594bc 100644
373a02
--- a/src/MirrorJob.cc
373a02
+++ b/src/MirrorJob.cc
373a02
@@ -660,9 +660,9 @@ void MirrorJob::HandleChdir(FileAccessRef& session, int &redirections)
373a02
 	    char *loc=alloca_strdup(loc_c);
373a02
 	    ParsedURL u(loc,true);
373a02
 
373a02
+	    bool is_file=(last_char(loc)!='/');
373a02
 	    if(!u.proto)
373a02
 	    {
373a02
-	       bool is_file=(last_char(loc)!='/');
373a02
 	       FileAccess::Path new_cwd(session->GetNewCwd());
373a02
 	       new_cwd.Change(0,is_file,loc);
373a02
 	       session->PathVerify(new_cwd);
373a02
@@ -671,7 +671,8 @@ void MirrorJob::HandleChdir(FileAccessRef& session, int &redirections)
373a02
 	    }
373a02
 	    session->Close(); // loc_c is no longer valid.
373a02
 	    session=FA::New(&u);
373a02
-	    session->Chdir(u.path);
373a02
+	    FileAccess::Path new_cwd(u.path,is_file,url::path_ptr(loc));
373a02
+	    session->PathVerify(new_cwd);
373a02
 	    return;
373a02
 	 }
373a02
       }
373a02
-- 
373a02
2.1.0
373a02