airdcpp-web / airdcpp-webclient

Communal peer-to-peer file sharing application for file servers/NAS devices
https://airdcpp-web.github.io
171 stars 31 forks source link

Making sure web-server.json is always written to file on --configure wizard #395

Closed h0od closed 3 years ago

h0od commented 3 years ago

When a user runs the --configure wizard we are effectively mutating the WebServerManager::plainServerConfig and WebServerManager::tlsServerConfig fields. So the WebServerManager::isDirty flag was never set, and no file was written.

h0od commented 3 years ago

This fixes #391

maksis commented 3 years ago

Yeah, that's the problem. However, I'd say that the current approach needs to be refactored to prevent bugs like this from happening as you shouldn't need to remember to call setDirty at every location where settings are being changed. Similar bugs currently also exist in the Windows UI.

maksis commented 3 years ago

Refactored in https://github.com/airdcpp/airdcpp-windows/commit/ca5e4c5c40b78a1c281854dabe9242c3e72a5a81