summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-05-21 20:21:03 +0000
committersr55 <[email protected]>2011-05-21 20:21:03 +0000
commit63e80e047737e4bc471dcf809c661f197ab89c67 (patch)
tree580ee257662cc4497fdafc161b1d3fae411c0c33 /win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
parent73c528c06ec24e5b40f7456e8cd16f8a05f87f92 (diff)
WinGui: Another fix for the preset service which was not correctly updating presets when installing a new version.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3993 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/PresetService.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/PresetService.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
index 75d9805cc..09788e6b4 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
@@ -64,7 +64,7 @@ namespace HandBrake.ApplicationServices.Services
// If the preset file doesn't exist. Create it.
if (!File.Exists(this.builtInPresetFile))
{
- this.UpdateBuiltInPresets(string.Empty);
+ this.UpdateBuiltInPresets();
}
this.LoadPresets();
@@ -204,10 +204,10 @@ namespace HandBrake.ApplicationServices.Services
/// <param name="cliPath">
/// The Path to the CLI, leave blank for current folder.
/// </param>
- public void UpdateBuiltInPresets(string cliPath)
+ public void UpdateBuiltInPresets()
{
// Create a new tempory file and execute the CLI to get the built in Presets.
- string handbrakeCLIPath = Path.Combine(cliPath, "HandBrakeCLI.exe");
+ string handbrakeCLIPath = Path.Combine(System.Windows.Forms.Application.StartupPath, "HandBrakeCLI.exe");
string presetsPath = Path.Combine(Path.GetTempPath(), "temp_presets.dat");
string strCmdLine = String.Format(@"cmd /c """"{0}"" --preset-list >""{1}"" 2>&1""", handbrakeCLIPath, presetsPath);
@@ -299,7 +299,7 @@ namespace HandBrake.ApplicationServices.Services
{
if (preset[0].Version != Properties.Settings.Default.HandBrakeVersion)
{
- this.UpdateBuiltInPresets(string.Empty);
+ this.UpdateBuiltInPresets();
return true;
}
}
@@ -390,7 +390,7 @@ namespace HandBrake.ApplicationServices.Services
catch (Exception exc)
{
RecoverFromCorruptedPresetFile(this.builtInPresetFile);
- this.UpdateBuiltInPresets(string.Empty);
+ this.UpdateBuiltInPresets();
throw new GeneralApplicationException("HandBrake has detected corruption in the presets file and has attempted to rebuild this file.", "Please restart HandBrake before continuing.", exc);
}