-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUpdateTeslalogger.cs
44 lines (41 loc) · 1.14 KB
/
UpdateTeslalogger.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeslaLogger;
namespace OVMS
{
class UpdateTeslalogger
{
public static void Chmod(string filename, int chmod, bool logging = true)
{
try
{
if (!Tools.IsMono())
{
return;
}
if (logging)
{
Logfile.Log("chmod " + chmod + " " + filename);
}
using (System.Diagnostics.Process proc = new System.Diagnostics.Process
{
EnableRaisingEvents = false
})
{
proc.StartInfo.FileName = "chmod";
proc.StartInfo.Arguments = chmod + " " + filename;
proc.Start();
proc.WaitForExit();
}
}
catch (Exception ex)
{
// ex.ToExceptionless().Submit();
Logfile.Log("chmod " + filename + " " + ex.Message);
}
}
}
}