Skip to content

Commit 6ae99f9

Browse files
committed
v0.8.0-beta
1 parent d3397ab commit 6ae99f9

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

MABProcessAtWait/Logger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace MABProcessAtWait {
77
class Logger {
88
public static string logPath = ".\\logs\\MABProcess.txt";
9-
private static int outputLevel = 3;
9+
private static int outputLevel = 2;
1010

1111
private static void Base(string logLevelStr, string message) {
1212
string logMessage = $"{DateTime.Now.ToString($"yyyy/MM/dd-HH:mm:ss")} [{logLevelStr}]:{message}\n";

MainForms/BackupDataListView.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,25 @@ private void LoadFromBackupFolder(World worldObj) {
7878
foreach (string backupFolder in backupFolders) {
7979
if (Path.GetExtension(backupFolder) == "zip") {
8080
backupFolder.Substring(0, backupFolder.Length - 4);
81-
logger.Debug("a::::::::::::" + backupFolder);
81+
logger.Debug("a:" + backupFolder);
8282
}
8383
DateTime time = DateTime.ParseExact((Path.GetFileName(backupFolder)).Substring(0, 12), "yyyyMMddHHmm", null);
8484
this.Items.Add(new BackupDataListViewItem(new string[] { time.ToString("yyyy-MM-dd HH:mm"), worldObj.WorldName, worldObj.WorldDir }, worldObj));
8585
}
8686
}
87-
catch (DirectoryNotFoundException) {
87+
catch (DirectoryNotFoundException e) {
8888
logger.Warn("バックアップが存在しません");
89+
logger.Warn(e.Message);
90+
logger.Warn(e.StackTrace);
8991
}
9092
}
9193

9294
private List<string> GetBackups(World w) {
95+
//バックアップがない場合で、_tmpファイルがある場合は前回のZipperがmoveを失敗してるだけの可能性があるから名前変更
96+
if (Directory.Exists(AppConfig.BackupPath + "_tmp") && (!Directory.Exists(AppConfig.BackupPath))) {
97+
Directory.Move(AppConfig.BackupPath + "_tmp", AppConfig.BackupPath);
98+
}
99+
93100
return Directory.GetFileSystemEntries(AppConfig.BackupPath + "\\" + w.WorldDir + "\\" + w.WorldName).ToList();
94101
}
95102

Zipper/Process.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,19 @@ class Process {
2727
public static int errorCount = 0;
2828
public static int skipCount = 0;
2929
public static async Task<int> MainProcess(string[] args) {
30-
30+
31+
//バックアップがない場合で、_tmpファイルがある場合は前回のZipperがmoveを失敗してるだけの可能性があるから名前変更
32+
if (Directory.Exists(AppConfig.BackupPath + "_tmp") && (!Directory.Exists(AppConfig.BackupPath))) {
33+
Directory.Move(AppConfig.BackupPath + "_tmp", AppConfig.BackupPath);
34+
}
35+
3136
Logger.Info("start Zipper");
3237
if (args.ToList().Count() == 0) {
3338
Logger.Error("argsが存在しません");
3439
EndTimeProcess(false);
3540
return 1;
3641
}
37-
//バックアップがない場合で、_tmpファイルがある場合は前回のZipperがmoveを失敗してるだけの可能性があるから名前変更
38-
if (Directory.Exists(AppConfig.BackupPath + "_tmp") && (!Directory.Exists(AppConfig.BackupPath))) {
39-
Directory.Move(AppConfig.BackupPath + "_tmp", AppConfig.BackupPath);
40-
}
41-
42+
4243
//tmpファイルを作りそこへバックアップ先を移す
4344
TmpProcess();
4445
Logger.Info($"tmpPath:{tmpPath}");

0 commit comments

Comments
 (0)