I'm looking for your thoughts. At the moment BRU renames immediately,
e.g. A >>> B.
What are your thoughts on renaming via an intermediate file
e.g. A >>>>_tmp001.tmp >>>>B.
The single advantage to this is that it would overcome one of the naming conflicts which occurs. If you have files
1.txt
2.txt
3.txt
and you want to insert a file into the list at position 2, you would want to change 2 to 3 and 3 to 4. But the first rename would fail, as 3.txt already exists.
Renaming via an intermediate file would overcome this, as the entire rename operation would be performed twice, once to the temporary names and then once to the real names.
It will be complicated to implement, especially to handle a situation where a different conflict occurs and we have to roll back. Also, if the program were to crash then the user might eb left with a load of unrecognisable names.
Comments please.
Jim