#1 2009-03-19 11:39

Munters
Member
Registered: 2009-03-19
Posts: 2

Prescan Conflict check incorrect

Got an conflict which doesn't had to be.
Tracked it down to the following example:

2 Rules:
1. Replace all "c" with "d" (skip extention)
2. Replace all "b" with "c" (skip extention)

2 Files:
1. ab.txt   --> ac.txt   <--- conflict marked, this is correct
2. ac.txt   --> ad.txt

Obvious this can be solved by moving file 2 above file 1.

The situation now is:
1. ac.txt   --> ad.txt
2. ab.txt   --> ac.txt   <--- conflict marked, this is not correct!

This is a problem in the Preview functionality only.
The actual Renaming does rename this two files correctly.

It would be a nice option for "fix conflicting new names" if the solution by changing the file order could be found automatically!

Offline

#2 2009-03-19 14:55

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: Prescan Conflict check incorrect

I guess the rule for such a situation could be - "If the new name of a file above is the same as the old name of a file below in the list, and the two reside in the same dir. (keeping in mind that the new name of the file above may include a move operation), then there is a conflict, else there isn't"?

But I'm not entirely sure how an automatic solution can be found if there is indeed a real conflict according to this rule. I mean, considering that files may be moved, or PascalScript may be involved for serialization etc., automatically moving files up and down in the list may not be what the user wants at all.

Offline

#3 2009-03-19 17:17

Munters
Member
Registered: 2009-03-19
Posts: 2

Re: Prescan Conflict check incorrect

You're rule doesn't include the possible presence of existing files which aren't part of the renaming list.

I'm afraid this can be solved only by performing a simulation of the complete proces: create a list of all dirs involved in the rename/move list, and retrieve a list of all files within these directories, thus creating a tree structure of all files possibly involved. Then simulate the renaming on this list.

Automatic reordering can be done as follows: If a conflict pops up, search the processing list (downwards from the current processing point) for the conflicting file. If found, move it to the current processing point and try to continue.

Last edited by Munters (2009-03-19 17:19)

Offline

Board footer

Powered by FluxBB