Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^7: Writing to a file atomically without renamingby Transient (Hermit) |
on Jul 01, 2005 at 02:45 UTC ( [id://471535]=note: print w/replies, xml ) | Need Help?? |
Quite right... which is what I stated here, no argument from me.
Worst case scenario the cat of the backup_file to temp_file fails and you're left with a corrupt "file" and the extra "backup_file" which would have to be moved back manually. Although moving the file over is another option in the case that this exception handling fails.. even if it does clobber the options, you can chmod it to at the least be group rw (or whatever it was before). Fin
In Section
Seekers of Perl Wisdom
|
|