Changes between Initial Version and Version 1 of Renaming


Ignore:
Timestamp:
17/09/08 15:13:03 (9 years ago)
Author:
alamaison
Comment:

Created explanation of Swish renaming

Legend:

Unmodified
Added
Removed
Modified
  • Renaming

    v1 v1  
     1= Renaming files or folders with Swish = 
     2 
     3If a file or folder already exists with the new name, a dialog appears asking if you would like to overwrite it.  This is unlike the way [wiki:WindowsXP Windows XP] and below work for normal filesystem operations.  The normal behaviour of these versions of Windows is to refuse to rename the file and ask you to try again.  I feel that our way is more useful and Microsoft seem to agree as [wiki:WindowsVista Windows Vista] works this way too. 
     4 
     5If confirmation is given, Swish attempts to overwrite the obstructing file or folder.  Due to the limitations of SFTP versions 4 and below, most servers will not allow atomic overwrite (this is where the rename and overwrite happen in one, uninterruptable manoeuvre).  We attempt to do this non-atomically by: 
     6 1. appending ".swish_renaming_temp" to the obstruction's filename 
     7 1. renaming the source file to the obstruction's old name 
     8 1. deleting the renamed obstruction 
     9If step 2 fails, we try to rename the temporary file back to its old name. It is possible that any of these steps may fail,  and as this is non-atomic the temporary file would remain in place.  It could be recovered by manually renaming it back. 
     10 
     11It remains to be seen if this causes more problems than it's worth in which case we can always revert back to the Windows XP-style way of doing things.