PDA

View Full Version : Safe Mode Saving


dreyfusj
10-21-2001, 09:13 AM
Hi,

Is there a safe mode like in BulletPr**f or in GetR*ght when saving a file to a PC (Win 98 SE). It really helps when the PC crashed while downloading.

Thanks !

MxxCon
10-21-2001, 10:48 PM
FlashFXP will automaticaly "checkpoint" i belive every minute.

dreyfusj
10-22-2001, 11:29 AM
On my system, the downloaded file size remains = 0 until the download is completed. Only then the file gets its final size. If a crash occurs before the complete download, the queue is saved OK but the file fragments get lost in most cases.

.jfd.

Fusion
10-22-2001, 12:30 PM
If I understand him right (and recall bpftps scheme), he's asking for an continous write-to-disk option. It's somewhat safer as far as "crash-recovery" goes, but more intense on system resources due to the disk-writes. Depending on the system setup, it could also be slower than buffered writes.

Fused
10-22-2001, 02:34 PM
Uhm, as far as I can tell, FFXP does a semi-continuous write. It updates on disk every few seconds, (10-15?).

If you refresh your local window while downloading, you'll see the size going up every once in a while, it doesn't update the window until the file is done so it looks like it's still on 0 bytes, but if you refresh the window you'll see it's actually writing the file.

Fusion
10-22-2001, 02:51 PM
Yea, but in a crash the file will be set at 0 bytes (and depending on the severity of the crash, the disk-checker dump the real file in it's windows-equivalent to lost+found/. I can see what a hassle that is for dialup users.

I'm not sure how to fix it so the file isn't marked "dirty" while download is underway, but I imagine some soft of sequential solution is used by bp.

MxxCon
10-22-2001, 06:12 PM
NTFS doesn't have this problem:)

sometimes when FAT system crashes it will lose such file, and sometimes it won't...

bigstar
10-22-2001, 08:30 PM
I did some further testing and it appears win9x handles it differently. (doesn't work as intended)

FlashFXP flushes the file buffers using the FlushFileBuffers() API every 60 seconds. This works great under win2k but I did some testing in Win9x and it didn't seem to have any effect. I'm not sure why and I was unable to find any explanation.

The only other solution I can think of would be to constantly open/close the file and that's not something I am willing to do, even as an option, because it requires completely rewriting my perfectly working and fine tuned buffered stream file I/O component.