X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Furl.c;h=afc31811d443378c7576a5eb17d6e919ba792298;hp=2453157a617d0b4df79afe57a607ccf7644d4d04;hb=fb0946c7fc6f1831894e8fd67389c0bc74a387b8;hpb=a9a2b34b052cfa903462124f59fbfeed7eaf374b diff --git a/src/url.c b/src/url.c index 2453157a..afc31811 100644 --- a/src/url.c +++ b/src/url.c @@ -1291,7 +1291,9 @@ enum { filechr_control = 4 /* a control character, e.g. 0-31 */ }; -#define FILE_CHAR_TEST(c, mask) (filechr_table[(unsigned char)(c)] & (mask)) +#define FILE_CHAR_TEST(c, mask) \ + ((opt.restrict_files_nonascii && !c_isascii ((unsigned char)(c))) || \ + (filechr_table[(unsigned char)(c)] & (mask))) /* Shorthands for the table: */ #define U filechr_not_unix