Whitelist save error
CP44 opened this issue ยท 4 comments
Found to occur in
35b52e9
and previous version 0167584...
[20:02:17][INFO] : Command input: /whitelist show
[20:02:17][ERROR] : Error saving whitelist!, Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path)
at DarkMultiPlayerServer.WhitelistSystem.SaveWhitelist()
Similar issue occurs with /whitelist add name command.
Name values are written to DMPWhitelist.txt on separate lines as previously observed and assumed correct behavior. Upon server restart, whitelist is empty and above errors are repeatable by trying to re-add existing names or new names.
My refactor likely caused this. Show definitely shouldn't save, but what's more likely here is the setting is being used without being initialized.
I could fix it ASAP but I'd need @godarklight 's permission to push to master. I'm fixing it anyway. The reformatting should've broken it, aswell as the other lists.
Rocky suggested testing other list functions. The admin list does not appear to save changes such as the deletion of a user from admin status.
Fixed via bc25fd3