On 2016-08-28 19.00, ros-dev-request(a)reactos.org wrote:
Subject:
Re: [ros-dev] [ros-diffs] [gadamopoulos] 72398: [SHELL32] - Fail to
delete any file if one is invalid. - Patch by andy-123 CORE-9959
From:
Thomas Faber <thomas.faber(a)reactos.org>
Date:
2016-08-28 15.42
To:
ros-dev(a)reactos.org
On 2016-08-20 11:43,gadamopoulos@svn.reactos.org wrote:
>---
trunk/reactos/dll/win32/shell32/shlfileop.cpp [iso-8859-1] (original)
>+++ trunk/reactos/dll/win32/shell32/shlfileop.cpp [iso-8859-1] Sat Aug 20 09:43:09
2016
>@@ -1480,6 +1480,19 @@
> return 0;
> }
>
>+ /* Check files. Do not delete one if one file does not exists */
>+ for (i = 0; i < flFrom->dwNumFiles; i++)
>+ {
>+ fileEntry = &flFrom->feFiles[i];
>+
>+ if ((HANDLE)fileEntry->attributes == INVALID_HANDLE_VALUE)
What's wrong with INVALID_FILE_ATTRIBUTES?
Fully agree with Thomas.. That is wrong.. Attributes are not handles.
Further, this replicates the unacceptable behavior of the Windows shell,
whereby an entire list of files is dropped when just one fail.
I've argued, some years ago, that such lists should be continued,
ideally adding failed files to a "failed" list to be presented to the user.
You can *not* make any valid assumption of whether other files in the list
will fail just because one of them doesn't exist, or cant be moved because
it's locked, or whatever.
That you are currently writing on this code gives you a good opportunity
to make our shell better than Microsoft's in this regard.
Best Regards
// Neo
> >+ {
> >+ // This is a windows 2003 server specific value which has been
removed.
> >+ // Later versions of windows return ERROR_FILE_NOT_FOUND.
> >+ return ERROR_SHELL_INTERNAL_FILE_NOT_FOUND;
> >+ }
> >+ }
> >+
> > for (i = 0; i < flFrom->dwNumFiles; i++)
> > {
> > bPathExists = TRUE;
--
There is one thing stronger than all the armies in the world,
and that's an idea whose time has come. [Victor Hugo]