rodlie / qtfm

Qt File Manager
https://qtfm.eu
GNU General Public License v2.0
156 stars 43 forks source link

Configuation file damaged on settings save #71

Closed slackuser0xae34 closed 5 years ago

slackuser0xae34 commented 5 years ago

On Slackware 14.2, using Fluxbox (1.3.7), the Qtfm6 configuation file is damaged after doing a "Settings" -> "Save". The code to cleanup the config file doesn't run when fluxbox is shut down, taking Qtfm with it. Shutting down fluxbox on log out leaves the damaged config file. This happens in Qtfm 6.1.2 (and Qtfm5.5).

I've found the problem. The readShortcuts (in "actiondefs.cpp") is called by the slot in mainwindow.cpp: "connect(customActManager, SIGNAL(actionsLoaded()), SLOT(readShortcuts())); " In essence the settings file is open for writing to bookmarks and there is an attempt to write shortcuts at the same time. The result is a damaged config file. The attached is a patched file for a proposed fix for this:

actiondefs.zip

Thanks

rodlie commented 5 years ago

Thanks for the report.

rodlie commented 5 years ago

I was not able to replicate the issue on a Slackware 14.2 clean install using Fluxbox, but the patch has been applied to prevent this potential issue. Thanks :+1: