Dragonne can you verify if you have any .txt files in the filters directory that matches the .conf? If so, it will always load the .txt file instead on the .conf file.
Code:
private void mnuAddEditAlerts_Click(object sender, System.EventArgs e) {
string zone = this.statusBar.Panels[3].Text;
try {
string filterDir = Settings.Instance.FilterDir;
if (File.Exists(Path.Combine(filterDir, String.Format("{0}.txt", zone))))
Process.Start("notepad.exe", Path.Combine(filterDir, String.Format("{0}.txt", zone)));
else if (File.Exists(Path.Combine(filterDir, String.Format("filter_{0}.conf", zone))))
Process.Start("notepad.exe", Path.Combine(filterDir, String.Format("filter_{0}.conf", zone)));
else
Process.Start("notepad.exe", Path.Combine(filterDir, String.Format("{0}.txt", zone)));
}
catch (Exception ex) {LogLib.WriteLine(String.Format("Error opening {0} alert file for editing: {1}", zone, ex.Message));}
}
public void ReadAlertFile(string filename) {
int type = 0;
// Load the alerts
StreamReader sw;
try {
string filterDir = Settings.Instance.FilterDir;
if (File.Exists(Path.Combine(filterDir, String.Format("{0}.txt", filename)))) {
// found zone.txt for an alert file
sw = new StreamReader(File.Open(Path.Combine(Settings.Instance.FilterDir, String.Format("{0}.txt", filename)), FileMode.Open, FileAccess.Read, FileShare.Read));
} else if (File.Exists(Path.Combine(filterDir, String.Format("filter_{0}.conf", filename)))) {
// found filter_zone.txt for an alert file
sw = new StreamReader(File.Open(Path.Combine(filterDir, String.Format("filter_{0}.conf", filename)), FileMode.Open, FileAccess.Read, FileShare.Read));
} else {
// didn't find either version of the alert file, so create the default and return
LogLib.WriteLine("Alert file not found for " + filename + ", creating default.", 2);
// file not found, make it !
Looking at the code I don't see anything that would prevent the .conf if there was no .txt file for that zone.