ZTree.com  | ZEN  | About...  

 Index   Back

[Bug] User file changes can be lost   [Zeta]

By: John Gruener     Orlando, Florida  
Date: Nov 28,2021 at 02:30
In Response to: [Zeta] v2.4.202 Now Available! (Kim Henkel)

> IMPORTANT: Starting with build 2.4.31, all user files (ZTW.HST etc.) will be written
> to the current users' profile directory at %APPDATA%\ZTreeWin, *if* ZTree is itself
> installed under 'Program Files'. This is to avoid installation issues related to UAC
> and remove reliance on the VirtualStore.

I post this as a Bug because ZTree is not always complying with the above rule posted here on the forum and in the Help file. As a result the user can lose F9 Menu updates, Config Options changes, and session History.

The problem occurs, as it did here for Peter a year and a half ago:
https://ztw3.com/forum/forum_entry.php?id=122960
when ZTree is installed under 'Program Files' and any of the three files ZTW.ZAM, ZTW.INI or ZTW.HST exists in that installed directory, but does not exist in %AppData%\ZTreeWin.

In such a case, ZTree reads the existing file from the installed directory, then attempts to save it to the same place when the F9 Menu, Config Options or History file is saved.

If ZTree is run as Administrator this works OK. But if run as non-Admin any changes to the respective file are lost. In the case of the F9 Menu an error is displayed, but all changes made to the menu are lost. In the case of changes to Config Options the changes are silently lost. For History, an error is displayed when saving from the History menus F3 Save or Write, but silently lost on Quit.

The solution to this is to always follow the stated rule to save the file to %AppData%\ZTreeWin, and abandon the file stored under Program Files. It would be good, although not necessary, to display a message notifying the user this was happening. It would be a one-time message for each file, since after that the file will be read from and saved to AppData.

This should be done even if run as Administrator. Although Administrators can write to the Program Files subdirectories, the rule should be followed that these files will always be saved in %AppData%\ZTreeWin.

- John

735 views      
Thread locked
 

Messages in this Thread

 
96,640 Postings in 12,231 Threads, 350 registered users, 70 users online (0 registered, 70 guests)
Index | Admin contact |   Forum Time: Apr 15, 2024 - 1:12 pm UTC  |  Hits:62,866,297  (10,865 Today )
RSS Feed