diff options
author | sr55 <[email protected]> | 2009-09-21 17:53:53 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-09-21 17:53:53 +0000 |
commit | be1cdf813acaaec2821e5bb6ba2aa157ffac2d32 (patch) | |
tree | c614bbd68fe0835b33500260a3a9b34083252d2a /win | |
parent | 2eb1ef0060a0e14602bb6c508a71c62e24adde20 (diff) |
WinGui:
- Possible fix for some exceptions / issues in the Activity window that may occur under unusual conditions that may prevent the log file from being read properly
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2834 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/frmActivityWindow.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs index 8b2135d0b..9509500a6 100644 --- a/win/C#/frmActivityWindow.cs +++ b/win/C#/frmActivityWindow.cs @@ -33,6 +33,8 @@ namespace Handbrake _encodeQueue = eh;
_mainWin = mw;
+ fileNotFoundQuickFix = false;
+
if (file == "last_scan_log.txt")
SetLogView(true);
else
@@ -174,7 +176,7 @@ namespace Handbrake // Copy the log file.
if (File.Exists(logFile))
- File.Copy(logFile, logFile2);
+ File.Copy(logFile, logFile2, true);
else
{
if (fileNotFoundQuickFix)
@@ -183,8 +185,6 @@ namespace Handbrake return "\n\n\nERROR: The log file could not be found. \nMaybe you cleared your system's tempory folder or maybe you just havn't run an encode yet. \nTried to find the log file in: " + logFile;
}
-
- // Open the copied log file for reading
StreamReader sr = new StreamReader(logFile2);
string line;
int i = 1;
@@ -204,9 +204,8 @@ namespace Handbrake }
catch (Exception exc)
{
- MessageBox.Show("Error in ReadFile() \n Unable to read the log file.\n You may have to restart HandBrake.\n Error Information: \n\n" + exc, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ return "Error in ReadFile() \n Unable to read the log file.\n You may have to restart HandBrake. Will try reading the file again in a few seconds... \n Error Information: \n\n" + exc;
}
- return null;
}
protected override void OnClosing(CancelEventArgs e)
|