summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkgtools/pkg_install/files/lib/ftpio.c18
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
2 files changed, 10 insertions, 12 deletions
diff --git a/pkgtools/pkg_install/files/lib/ftpio.c b/pkgtools/pkg_install/files/lib/ftpio.c
index 43ec0c1a372..00a746a0f29 100644
--- a/pkgtools/pkg_install/files/lib/ftpio.c
+++ b/pkgtools/pkg_install/files/lib/ftpio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpio.c,v 1.21 2007/04/16 12:55:35 joerg Exp $ */
+/* $NetBSD: ftpio.c,v 1.22 2007/07/14 22:57:15 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -8,7 +8,7 @@
#include <sys/cdefs.h>
#endif
#ifndef lint
-__RCSID("$NetBSD: ftpio.c,v 1.21 2007/04/16 12:55:35 joerg Exp $");
+__RCSID("$NetBSD: ftpio.c,v 1.22 2007/07/14 22:57:15 joerg Exp $");
#endif
/*-
@@ -655,7 +655,7 @@ ftp_expand_URL(const char *base, char *pattern)
char *s, buf[MaxPathSize];
char tmpname[MaxPathSize];
char best[MaxPathSize];
- int rc, tfd, retry_tbz;
+ int rc, got_list, tfd, retry_tbz;
retry_tbz = 0;
best[0]='\0';
@@ -700,12 +700,10 @@ retry_with_tbz:
}
rc = ftp_cmd(buf, "\n(550|450|226).*\n"); /* catch errors */
- if (rc != 226) {
- if (Verbose)
- warnx("nlist failed!");
- unlink(tmpname); /* remove clutter */
- return NULL;
- }
+ if (rc != 226)
+ got_list = 0;
+ else
+ got_list = 1;
/* Sync - don't remove */
rc = ftp_cmd("cd .\n", "\n(550|250|257).*\n");
@@ -715,7 +713,7 @@ retry_with_tbz:
return NULL;
}
- if (access(tmpname, R_OK)==0) {
+ if (got_list == 1 && access(tmpname, R_OK)==0) {
int matches;
FILE *f;
char filename[MaxPathSize];
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index 173ccf1a053..739737b4d37 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.66 2007/07/14 20:19:48 adrianp Exp $ */
+/* $NetBSD: version.h,v 1.67 2007/07/14 22:57:15 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -33,6 +33,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20070714"
+#define PKGTOOLS_VERSION "20070715"
#endif /* _INST_LIB_VERSION_H_ */