That doesn't look like a great way to choose a backup filename - the rename will succeed even for candidate backup filenames that exist (permissions permitting),...
Really? I'm pretty certain that I have never used a filesystem that, regardless of permissions, would allow you to rename one file on top of an existing one. Which filesystem are you using?
In reply to Re^5: Copying a file to a temporary file
by BrowserUk
in thread Copying a file to a temporary file
by shay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |