summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/network.c
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-23 19:06:16 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-23 19:06:16 +0000
commit4d2e164bf61c437c7cf0d0a62cf1f800dbf6efc7 (patch)
treeaed988a98640eb9e1ac07fc95f431a8fda4f1cb0 /mdk-stage1/network.c
parent491327b24e6426b42f69cd337b2a93a412c408ae (diff)
downloaddrakx-backup-do-not-use-4d2e164bf61c437c7cf0d0a62cf1f800dbf6efc7.tar
drakx-backup-do-not-use-4d2e164bf61c437c7cf0d0a62cf1f800dbf6efc7.tar.gz
drakx-backup-do-not-use-4d2e164bf61c437c7cf0d0a62cf1f800dbf6efc7.tar.bz2
drakx-backup-do-not-use-4d2e164bf61c437c7cf0d0a62cf1f800dbf6efc7.tar.xz
drakx-backup-do-not-use-4d2e164bf61c437c7cf0d0a62cf1f800dbf6efc7.zip
(ftp_prepare) try arched directory for FTP installs too...
Diffstat (limited to 'mdk-stage1/network.c')
-rw-r--r--mdk-stage1/network.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index 08766b9dd..a156e153f 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -1072,6 +1072,16 @@ enum return_type ftp_prepare(void)
fd = ftp_start_download(ftp_serv_response, location_full, &size);
}
+ /* Try arched directory */
+ if (fd < 0) {
+ log_message("%s failed.", location_full);
+ char *with_arch = asprintf_("%s%s/%s/%s", answers[1][0] == '/' ? "" : "/", answers[1], ARCH, COMPRESSED_FILE_REL("/"));
+ log_message("trying %s...", with_arch);
+ fd = http_download_file(answers[0], with_arch, &size, use_http_proxy ? "http" : NULL, http_proxy_host, http_proxy_port);
+ if (0 < fd)
+ strcpy(location_full, with_arch);
+ }
+
if (fd < 0) {
char *msg = str_ftp_error(fd);
log_message("FTP: error get %d for remote file %s", fd, location_full);