Skip to content

Commit

Permalink
Make use of IniFile.TryLoad() and IniFile.TrySave() functions
Browse files Browse the repository at this point in the history
  • Loading branch information
RiJo committed Dec 18, 2014
1 parent 00a5ba3 commit 8b4b246
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions MediaOrganizer/MediaOrganizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,7 @@ public void LoadConfig() {
SaveConfig();

IniFile iniFile = new IniFile();
try
{
iniFile.Load(iniFilePath);
}
catch (Exception)
{
return;
}
iniFile.TryLoad(iniFilePath);

if (iniFile.Contains("sourcePath"))
sourcePath = iniFile["sourcePath"];
Expand All @@ -177,7 +170,7 @@ public void SaveConfig()
iniFile["recursive"] = Recursive ? "1" : "0";

string iniFilePath = IniConfigFileName;
iniFile.Save(iniFilePath);
iniFile.TrySave(iniFilePath);
}

public OrganizeSummary Parse()
Expand Down

0 comments on commit 8b4b246

Please sign in to comment.