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

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