]> sjero.net Git - wget/blobdiff - src/ftp.c
[svn] Split off non-URL related stuff from url.c to convert.c.
[wget] / src / ftp.c
index d70969ad72949e0f4d8a7dd029fd779698f54130..d3efa8050b39af9fcea9d416d37098e46d519221 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -54,6 +54,7 @@ so, delete this exception statement from your version.  */
 #include "host.h"
 #include "fnmatch.h"
 #include "netrc.h"
+#include "convert.h"           /* for downloaded_file */
 
 #ifndef errno
 extern int errno;
@@ -69,7 +70,7 @@ typedef struct
   int st;                      /* connection status */
   int cmd;                     /* command code */
   struct rbuf rbuf;            /* control connection buffer */
-  long dltime;                 /* time of the download */
+  double dltime;               /* time of the download in msecs */
   enum stype rs;               /* remote system reported by ftp server */ 
   char *id;                    /* initial directory */
   char *target;                        /* target file name */
@@ -397,11 +398,19 @@ Error in server response, closing control connection.\n"));
 
             A relative directory is one that does not begin with '/'
             and, on non-Unix OS'es, one that doesn't begin with
-            "<letter>:".  */
+            "[a-z]:".
+
+            This is not done for OS400, which doesn't use
+            "/"-delimited directories, nor does it support directory
+            hierarchies.  "CWD foo" followed by "CWD bar" leaves us
+            in "bar", not in "foo/bar", as would be customary
+            elsewhere.  */
 
          if (target[0] != '/'
              && !(con->rs != ST_UNIX
-                  && ISALPHA (target[0]) && target[1] == ':'))
+                  && ISALPHA (target[0])
+                  && target[1] == ':')
+             && con->rs != ST_OS400)
            {
              int idlen = strlen (con->id);
              char *ntarget, *p;
@@ -1157,7 +1166,7 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con)
 
       /* If we get out of the switch above without continue'ing, we've
         successfully downloaded a file.  Remember this fact. */
-      downloaded_file(FILE_DOWNLOADED_NORMALLY, locf);
+      downloaded_file (FILE_DOWNLOADED_NORMALLY, locf);
 
       if (con->st & ON_YOUR_OWN)
        {