rejetto forum
Software => HFS ~ HTTP File Server => Bug reports => Topic started by: adrian3k on November 04, 2023, 01:21:46 PM
-
Hi.
From time to time a see a bug with saving file system to file.
Older *.vfs are around ~6kB (and they are fine), new saved file has ~250bytes
Can't find 'why', but without restarting the server everything is fine. Problem when power is lost or PC crash - have to add files/folders/users again and again.
Can some info be saved 'from memory' before exiting the program to later 'add from saved memory' after I get empty Virtual File System window?
Also there is a strange bug that allowing anyone to access - can't revert this option without restarting program.
-
This is the only method that comes to mind, and I hope that it will solve your problem of loss of VFS ;)
switch to expert mode (key F5)
select Menu>Save options to file, and activate Menu>Auto-save Options
in Menu>Virtual File System , choice Backup on Save and Autosave every: enter 900 (= every 15mn) or more
Menu>Others options> Edit Event Script... (ALT+F6)
put this content in hfs.events and save it in the hfs.exe folder
[server start]
{.if|{.{.filesize|hfs.vfs.}<255.}|
{:{.add to log|Empty VFS detected.}
{.if|{.exists|hfs.vfs.bak.}|
{:{.add to log| VFS backup found.}
{.delete|hfs.vfs.}
{.copy|hfs.vfs.bak|hfs.vfs.}
{.add to log| previous VFS restored and loaded.}
:}|{:{.add to log| VFS backup not found.}:}
/if.}:}
|{:{.add to log|VFS seems good.}:}
/if.}
this script tests if the size of the vfs is less than a certain value (255 to be reduced if necessary) and in this case restores the backup, every time the server is SWITCHING ON ( not possible only when hfs is launched), allowing a functional VFS to be found
verify in windows registry if not exist those keys else delete them
HKEY_CURRENT_USER\Software\rejetto and HKEY_LOCAL_MACHINE\Software\rejetto
-
This is the only method that comes to mind, and I hope that it will solve your problem of loss of VFS ;)
Hey Mars! Woo-hoo!! :D Happy to see you, like the good-old days... (and nice macro solution, by the way). Now we just need SilentPliz (https://rejetto.com/forum/index.php?action=profile;u=3008) to visit us, and the team is almost complete. 8)
-
This is the only method that comes to mind, and I hope that it will solve your problem of loss of VFS ;)
Thank you very much, but the bak files are also messed up.
Managed to copy by hand settings (allow >1 instance, open in second and add files having both instances opened - F8, up one folder, drag&drop) - not the shortest one, but at least solved the problem of making everything from scratch.
Guess running 24/7 for couple months has it's problems :(
-
...this script tests if the size of the vfs is less than a certain value (255 to be reduced if necessary) and in this case restores the backup...
Besides checking VFS's file size, is there some alternative to check VFS integrity? (even if it requires modifying the source code). This is serious, because I think it could be very frustrating loosing a well configured VFS.
ยป Edit: by saying 'checking VFS integrity', I mean comparing what's loaded on memory, versus what is stored on file, before writing the VFS to the disk (of course it would need writing a new function, modifying the source code). An easy source code modification, would be saving a copy of the VFS without compressing (without applying zlib). If the origin of this issue is a bug with zlib, perhaps on those cases, it could be useful (or not, it depends). ???
-
I suggested a new file format to save settings - JSON in Zip.
So it's much easier to check for corruption and modify by hands.
Unfortunately I don't have time to make a patch for Rejetto's version as my version is very different now...
Maybe someone could make it? I think new format and PNG-support - is a must have.
-
HFS versions 2.3 and 2.4 will no longer evolve, the VFS recording format cannot be modified in order to maintain compatibility between these versions
a new HFS 3.0 development has been implemented by rejecto by following this link
https://rejetto.com/forum/index.php?board=46.0
-
HFS3 uses yaml, like json but more human friendly