diff options
author | sr55 <[email protected]> | 2009-12-18 20:58:56 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-12-18 20:58:56 +0000 |
commit | ce825a48b43c003f45ace85a2711925a695ffdf0 (patch) | |
tree | 45f49b3f6d5a04cf4a0ab525420d4fc8b4ca51bd | |
parent | 03269c48edcef15f404fd79d7f54b2f083295473 (diff) |
WinGui:
- Move the Queue Recovery file to HandBrakes appdata folder. Queue Recovery file won't be deleted when temp folder is cleared now.
Note that it will not detect the old hb_queue_recovery.xml file in the systems temp folder.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3034 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/C#/EncodeQueue/EncodeAndQueueHandler.cs | 6 | ||||
-rw-r--r-- | win/C#/Functions/Main.cs | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/win/C#/EncodeQueue/EncodeAndQueueHandler.cs b/win/C#/EncodeQueue/EncodeAndQueueHandler.cs index f2a4eaedf..db91e6d90 100644 --- a/win/C#/EncodeQueue/EncodeAndQueueHandler.cs +++ b/win/C#/EncodeQueue/EncodeAndQueueHandler.cs @@ -141,7 +141,8 @@ namespace Handbrake.EncodeQueue /// <param name="file">The location of the file to write the queue to.</param>
public void WriteQueueStateToFile(string file)
{
- string tempPath = file == "hb_queue_recovery.xml" ? Path.Combine(Path.GetTempPath(), "hb_queue_recovery.xml") : file;
+ string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\hb_queue_recovery.xml");
+ string tempPath = file == "hb_queue_recovery.xml" ? appDataPath : file;
try
{
@@ -205,7 +206,8 @@ namespace Handbrake.EncodeQueue /// <param name="file">The location of the file to read the queue from.</param>
public void LoadQueueFromFile(string file)
{
- string tempPath = file == "hb_queue_recovery.xml" ? Path.Combine(Path.GetTempPath(), "hb_queue_recovery.xml") : file;
+ string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\hb_queue_recovery.xml");
+ string tempPath = file == "hb_queue_recovery.xml" ? appDataPath : file;
if (File.Exists(tempPath))
{
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index 250813df6..9d2489f94 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -263,7 +263,7 @@ namespace Handbrake.Functions {
try
{
- string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.xml");
+ string tempPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\hb_queue_recovery.xml");
if (File.Exists(tempPath))
{
using (FileStream strm = new FileStream(tempPath, FileMode.Open, FileAccess.Read))
|