Skip to content

Commit

Permalink
Merge pull request #11 from mattpannella/develop
Browse files Browse the repository at this point in the history
optional parameter for settings file
  • Loading branch information
mattpannella authored Sep 19, 2022
2 parents b4ba5ca + 3c81c2b commit dda6686
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class PocketCoreUpdater
/// </summary>
/// <param name="updateDirectory">The directory to install/update openFPGA cores in.</param>
/// <param name="coresFile">Path to cores json file</param>
public PocketCoreUpdater(string updateDirectory, string coresFile = null)
public PocketCoreUpdater(string updateDirectory, string coresFile = null, string settingsPath = null)
{
UpdateDirectory = updateDirectory;

Expand All @@ -61,7 +61,11 @@ public PocketCoreUpdater(string updateDirectory, string coresFile = null)
}
LoadCores();

SettingsFile = Path.Combine(updateDirectory, "pocket_updater_settings.json");
if(settingsPath != null) {
SettingsFile = Path.Combine(settingsPath, "pocket_updater_settings.json");
} else {
SettingsFile = Path.Combine(updateDirectory, "pocket_updater_settings.json");
}
LoadSettings();
}

Expand Down

0 comments on commit dda6686

Please sign in to comment.