🐛 修改了log文件夹
This commit is contained in:
@@ -12,7 +12,10 @@ namespace GeekDesk.Util
|
||||
try
|
||||
{
|
||||
Exception ex = exception as Exception;
|
||||
|
||||
if (!Directory.Exists(Constants.ERROR_FILE_PATH.Substring(0, Constants.ERROR_FILE_PATH.LastIndexOf("\\"))))
|
||||
{
|
||||
Directory.CreateDirectory(Constants.ERROR_FILE_PATH.Substring(0, Constants.ERROR_FILE_PATH.LastIndexOf("\\")));
|
||||
}
|
||||
using (FileStream fs = File.Open(Constants.ERROR_FILE_PATH, FileMode.OpenOrCreate, FileAccess.ReadWrite))
|
||||
{
|
||||
fs.Seek(0, SeekOrigin.End);
|
||||
@@ -58,6 +61,10 @@ namespace GeekDesk.Util
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(Constants.LOG_FILE_PATH.Substring(0, Constants.LOG_FILE_PATH.LastIndexOf("\\"))))
|
||||
{
|
||||
Directory.CreateDirectory(Constants.LOG_FILE_PATH.Substring(0, Constants.LOG_FILE_PATH.LastIndexOf("\\")));
|
||||
}
|
||||
using (FileStream fs = File.Open(Constants.LOG_FILE_PATH, FileMode.OpenOrCreate, FileAccess.ReadWrite))
|
||||
{
|
||||
fs.Seek(0, SeekOrigin.End);
|
||||
|
||||
Reference in New Issue
Block a user