[PATCH 4/6] Report failure extracting a file from package to the user

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Apr 20 16:37:00 GMT 2011

On Apr  8 15:43, Jon TURNEY wrote:
> At the moment, all errors in archive::extract_file() are assumed to be due
> to a failure to open the file for writing due to it being opened by another
> process.
> Distinguish when the error is due to an inability to read the file from the
> source archive, and report that.
> 2011-04-08  Jon TURNEY  <...>
> 	* install.cc (extract_replace_on_reboot): New function containg code
> 	extracted from...
> 	(installOne): Report read errors differently to write errors
> 	* archive.cc (extract_file): Distinguish read errors from write errors

This loooks good to me.  Just a question...

> +          /* XXX FIXME: prefix may not be / for in use files -
> +           * although it most likely is
> +           * - we need a io method to get win32 paths
> +           * or to wrap this system call

This comment doesn't make any sense to me anymore.  The incoming path
should already be a full Win32 path.  The function wouldn't work without
it and AFAIK the paths from the tar file are converted to full Win32
paths anyway.  There's also no reason to wrap this system call any further.
Bottom line is, just drop the comment, please.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-apps mailing list