Skip to content

Commit

Permalink
Bugfix - SensorHost crash when the Sensors deploy directory hasn't be…
Browse files Browse the repository at this point in the history
…en created
  • Loading branch information
tylercamp committed Nov 10, 2014
1 parent e399b74 commit 35abe9f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ private void sensorRuntime_DownloadCompletedEvent(Guid sensorID)
private void BuildSensorList()
{
EventLog.WriteEntry("Building sensor list");
Directory.SetCurrentDirectory(@"C:\Program Files (x86)\Construct\SensorHost\Sensors");
String sensorsInstallLocation = @"C:\Program Files (x86)\Construct\SensorHost\Sensors";
if (!Directory.Exists(sensorsInstallLocation))
Directory.CreateDirectory(sensorsInstallLocation);
Directory.SetCurrentDirectory(sensorsInstallLocation);

string[] sensorDirs = Directory.GetDirectories(Directory.GetCurrentDirectory());

Expand Down

0 comments on commit 35abe9f

Please sign in to comment.