View Single Post
Old 11-23-2009, 06:57 PM  
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Quote:
Originally Posted by sarettah View Post
Hmm. I don't think so. If the file had XX number of urls and took up XX amount of space at the beginning of the program it would still have xx number of urls and take up xx amount of space at the end. So, if the file fit on the HD before it still does after.

just
It's happened to me. ;) When you open a file for write it's first truncated, so if there's something else writing at that time, or the file system allows a truncate but not write when it's chock full, you'll end up with a 0 byte file. For a rotating buffer like this it's probably better to use a pointer and save that in a separate file - at least if that gets trashed then it just starts at 0 again...
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote