[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] Writing to a Read-Only directory
From: |
Gisle Vanem |
Subject: |
[Bug-wget] Writing to a Read-Only directory |
Date: |
Wed, 10 Feb 2016 14:48:40 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
Launching Wget from a Win-10 read-only directory [1] gives
inconsistent error messages.
E.g. wget http://www.watt-32.net/misc/ASMBSW.dll
...
Length: 107008 (105K) [application/x-msdos-program]
ASMBSW.dll: Permission denied
Cannot write to 'ASMBSW.dll' (No error).
----------------
Seems the "Permission denied" is lost when Wget prints "Cannot write to ..."
since the 'errno' from fopen() at http.c (line 2490):
logprintf (LOG_NOTQUIET, "%s: %s\n", hs->local_file, strerror (errno));
gets lost at http.c (line 3993):
logprintf (LOG_NOTQUIET, _("Cannot write to %s (%s).\n"),
quote (hstat.local_file), strerror (errno));
Other cases could trigger the same inconsistent error message.
So what can be done for such a case? Can we push and pop the 'errno'
(for all protocols) somehow?
--------
[1] I tried this in a directory from my old Windows installation thinking it
was safe to write to:
c:\Windows.old\WINDOWS\System32\DriverStore\FileRepository
But no. It is owned by the SYSTEM user. And will remain so until
I run the 'cleanmgr' program.
--
--gv
- [Bug-wget] Writing to a Read-Only directory,
Gisle Vanem <=