tool_urlglob: Allow reserved dos device names (Windows)

Allow --output to reserved dos device names without the device prefix
for backwards compatibility.

Example: --output NUL can be used instead of --output \\.\NUL

Bug: https://github.com/curl/curl/commit/4520534#commitcomment-15954863
Reported-by: Gisle Vanem
This commit is contained in:
Jay Satiro 2016-02-08 15:09:42 -05:00
parent 18c735e790
commit c3aac48919
1 changed files with 2 additions and 1 deletions

View File

@ -673,7 +673,8 @@ CURLcode glob_match_url(char **result, char *filename, URLGlob *glob)
{
char *sanitized;
SANITIZEcode sc = sanitize_file_name(&sanitized, target,
SANITIZE_ALLOW_PATH);
(SANITIZE_ALLOW_PATH |
SANITIZE_ALLOW_RESERVED));
Curl_safefree(target);
if(sc)
return CURLE_URL_MALFORMAT;