- March 31, 2009
- 7
- 0
- Home Country
- Portugal
Using the latest SVN revision 22162, I came up with a problem.
I have uninstalled the TV Server, but it left a log on ProgramData\Team MediaPortal\MediaPortal TV Server\log called un.install_1.0.0.0_2009-03-30_15-35-25.log.
The TVServerLogger is assuming that if I have that directory and if I have a file inside it then I have everything that needs for it to collect the log data.
So WatchDog will crash on:
Because the directory does not exist.
In order to fix this problem I have added the following lines on line 55 under TvServerLogger.cs on MediaPortal.Support:
This will prevent it from crashing, by not assuming that the directory is there.
Modified file attached.
Thanks
I have uninstalled the TV Server, but it left a log on ProgramData\Team MediaPortal\MediaPortal TV Server\log called un.install_1.0.0.0_2009-03-30_15-35-25.log.
The TVServerLogger is assuming that if I have that directory and if I have a file inside it then I have everything that needs for it to collect the log data.
So WatchDog will crash on:
Code:
new DirectoryInfo(basePath + "\\AnalogCard").GetFiles("*.xml");
Because the directory does not exist.
In order to fix this problem I have added the following lines on line 55 under TvServerLogger.cs on MediaPortal.Support:
Code:
string analogCardPath = basePath + "\\AnalogCard";
if (Directory.Exists(analogCardPath))
{
FileInfo[] xmlFiles = new DirectoryInfo(analogCardPath).GetFiles("*.xml");
foreach (FileInfo xmlFile in xmlFiles)
{
xmlFile.CopyTo(destinationFolder + "\\tvserver_AnalogCard_" + xmlFile.Name, true);
}
}
This will prevent it from crashing, by not assuming that the directory is there.
Modified file attached.
Thanks