diff --git a/ChangeLog b/ChangeLog index 81061a04..4b26494f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-14 Micah Cowan + + * ABOUT-NLS: Removed. + 2008-02-10 Micah Cowan * NEWS: Added note re interrupted files resulting in renames, diff --git a/doc/ChangeLog b/doc/ChangeLog index 509828cc..2f25f5a8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2008-03-17 Micah Cowan + + * wget.texi : Mention importance of + trailing slashes to --no-parents. + 2008-02-10 Micah Cowan * wget.texi : Added documentation of diff --git a/doc/wget.texi b/doc/wget.texi index 008e1809..a4407949 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -2202,6 +2202,14 @@ followed. Only the archive you are interested in will be downloaded. Essentially, @samp{--no-parent} is similar to @samp{-I/~luzer/my-archive}, only it handles redirections in a more intelligent fashion. + +@strong{Note} that, for HTTP (and HTTPS), the trailing slash is very +important to @samp{--no-parent}. HTTP has no concept of a ``directory''---Wget +relies on you to indicate what's a directory and what isn't. In +@samp{http://foo/bar/}, Wget will consider @samp{bar} to be a +directory, while in @samp{http://foo/bar} (no trailing slash), +@samp{bar} will be considered a filename (so @samp{--no-parent} would be +meaningless, as its parent is @samp{/}). @end table @node Relative Links diff --git a/src/ChangeLog b/src/ChangeLog index c78ee268..c6159ca3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2008-03-19 Micah Cowan + + * utils.c (test_dir_matches_p): More tests related for + dir_matches_p. + +2008-03-17 Micah Cowan + + * connect.c: Include sys/time.h to support use of the select + function on older systems. + 2008-02-11 Benno Schulenberg * http.c: More accurate and descriptive messages for when a file diff --git a/src/connect.c b/src/connect.c index e4ad453b..2be764d4 100644 --- a/src/connect.c +++ b/src/connect.c @@ -51,6 +51,9 @@ as that of the covered work. */ #ifdef HAVE_SYS_SELECT_H # include #endif /* HAVE_SYS_SELECT_H */ +#ifdef HAVE_SYS_TIME_H +# include +#endif #include "utils.h" #include "host.h" #include "connect.h" diff --git a/src/utils.c b/src/utils.c index 920f3b54..8c56d4db 100644 --- a/src/utils.c +++ b/src/utils.c @@ -2175,7 +2175,15 @@ test_dir_matches_p() { { "/somedir", "/someotherdir", NULL }, "anotherdir", false }, { { "/somedir", "/*otherdir", NULL }, "anotherdir", true }, { { "/somedir/d1", "/someotherdir", NULL }, "somedir/d1", true }, + { { "*/*d1", "/someotherdir", NULL }, "somedir/d1", true }, { { "/somedir/d1", "/someotherdir", NULL }, "d1", false }, + { { "!COMPLETE", NULL, NULL }, "!COMPLETE", true }, + { { "*COMPLETE", NULL, NULL }, "!COMPLETE", true }, + { { "*/!COMPLETE", NULL, NULL }, "foo/!COMPLETE", true }, + { { "*COMPLETE", NULL, NULL }, "foo/!COMPLETE", false }, + { { "*/*COMPLETE", NULL, NULL }, "foo/!COMPLETE", true }, + { { "/dir with spaces", NULL, NULL }, "dir with spaces", true }, + { { "/dir*with*spaces", NULL, NULL }, "dir with spaces", true }, }; for (i = 0; i < countof(test_array); ++i)