Merge branch 'new-master' of git.flash.moe:flashii/sharp-chat into new-master

This commit is contained in:
Pachira 2023-11-04 23:37:13 +00:00
commit c46d117d15

View file

@ -124,12 +124,11 @@ namespace SharpChat {
const string mdb_config = @"mariadb.txt";
bool hasMDB = File.Exists(mdb_config);
string[] mdbCfg = File.Exists(mdb_config) ? File.ReadAllLines(mdb_config) : Array.Empty<string>();
sw.WriteLine();
sw.WriteLine("# MariaDB configuration");
if(!string.IsNullOrWhiteSpace(mdbCfg[0]))
if(mdbCfg.Length > 0)
sw.WriteLine($"mariadb:host {mdbCfg[0]}");
else
sw.WriteLine($"#mariadb:host <username>");