]> granicus.if.org Git - curl/commitdiff
ftp->dirs[] is no longer terminated with a zero entry but ftp->dirdepth
authorDaniel Stenberg <daniel@haxx.se>
Thu, 15 Apr 2004 10:43:40 +0000 (10:43 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 15 Apr 2004 10:43:40 +0000 (10:43 +0000)
should be used

lib/ftp.c

index 7b942d823ee3d653696e02d30fc86712c32bce2c..cce1d9e9eb25fc7aa0b4af7bcccec349b138f4de 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2165,7 +2165,7 @@ CURLcode ftp_perform(struct connectdata *conn,
 
   {
     int i; /* counter for loop */
-    for (i=0; ftp->dirs[i]; i++) {
+    for (i=0; i < ftp->dirdepth; i++) {
       /* RFC 1738 says empty components should be respected too, but
          that is plain stupid since CWD can't be used with an empty argument */
       if ((result = ftp_cwd_and_mkd(conn, ftp->dirs[i])) != CURLE_OK)