[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Intended behavior of "File Already Exists" dialog box?
From:       David Faure <faure () kde ! org>
Date:       2004-10-27 9:19:17
Message-ID: 200410271119.17454.faure () kde ! org
[Download RAW message or body]

On Wednesday 27 October 2004 06:29, Steven P. Ulrick wrote:
> On Tuesday 26 October 2004 05:39 pm, David Faure wrote:
> > I see. This is due to the (new since a few releases) code which tries to do
> > a direct renaming before launching the full "copy + delete" operation. That
> > code has its own "rename dialog" code, and I didn't want to use the
> > "multiple files" and "skip" flags for it.... for a reason that I don't
> > understand anymore (confusing comment).
> >
> > So I added it now.
> > Testing showed that "skip" was broken (it crashed often), so I fixed that
> > too.
> >
> > There are chances I still missed something though, there are so many
> > cases... Care to test the attached patch (for CVS HEAD) ?
> 
> Hello, David
> The patch applied just fine, and I recompiled and installed kdelibs, and I got 
> my beloved "Skip" and "Auto Skip" back :)
> There is one problem that I discovered right away: let's say I have seven 
> files I want to move into a directory that may already have some or all of 
> them in it.  I select the desired files, drag them to the directory, and 
> choose to "Move" them to that location.  I choose to skip a few, and I choose 
> to overwrite a few.  The last one happens to be one that I want to skip.  So, 
> I click "Cancel", and a few seconds later, I find that none of the files that 
> I had wanted to move to that other directory were moved.  All the files I 
> started with are still in their original location.
You're a good tester - I also thought about this bug when going to bed last night :)
Easily fixed,
                if ( m_srcList.count() > 1 )
                    mode = (RenameDlg_Mode) ( mode | M_MULTI | M_SKIP );
                else
                    mode = (RenameDlg_Mode) ( mode | M_SINGLE );
(the first line was different).

> A similar experiment with "Copying" went as expected.  I copied all the files 
> to a directory.  Then I selected them again, and chose to "Copy" them into 
> the destination directory.  I chose to "Rename" one of them.  I clicked 
> "Cancel" on the last file.  When I looked at the contents of the destination 
> directory, I was pleased to find the original file I had copied there, and 
> the Renamed file as well.
Yes, this is again because "Move" works a bit differently when it can: it tries
to directly rename things when they are on the same partition.
Move across partitions works much more similar to copy.

> > > After making my choices to either skip or overwrite, when it gets down to
> > > the last file, the dialog reverts to the undesired "Move" behavior:
> > > http://www.faith4miracle.org/FileAlreadyExists-Copy-LastFile.jpg
> >
> > Well for the last file "Skip", "Auto Skip" or "Cancel" would do exactly the
> > same, they would just stop there. So there's no point in offering 3 choices
> > that do the same thing. "Skip" only makes sense if there are more things to
> > do after skipping this file.

I'm reconsidering this. Maybe it would be more consistent to always offer Skip,
so that you can ask to skip a file, whether it's the last file or not, without having
to think "ok, this is the last file, that's why my only remaining option is cancel"...
And if now moving has to offer skip even for the last file, it would be more consistent
to offer it when copying too...

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic