патч для перехода на другие ключи багов.

This commit is contained in:
2025-12-15 21:56:29 +03:00
parent 42b179a0cc
commit 7bb4531c1b
6 changed files with 36 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
package _VisualDVM.ComponentsServer;
import Common.Database.SQLITE.SQLiteDatabase;
import Common.Utils.Utils_;
import _VisualDVM.ComponentsServer.BugReport.BugReport;
import _VisualDVM.ComponentsServer.BugReport.BugReportsDBTable;
import _VisualDVM.ComponentsServer.BugReportRecipient.BugReportRecipient;
@@ -7,8 +8,12 @@ import _VisualDVM.ComponentsServer.BugReportRecipient.BugReportRecipientsDBTable
import _VisualDVM.ComponentsServer.BugReportSetting.BugReportSetting;
import _VisualDVM.ComponentsServer.BugReportSetting.BugReportSettingsDBTable;
import _VisualDVM.ComponentsServer.Recipient.RecipientsDataSet;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.Utils;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.nio.file.Paths;
import java.util.Comparator;
import java.util.Vector;
@@ -89,6 +94,22 @@ public class BugReportsDatabase extends SQLiteDatabase {
Update(recipient);
}
}
//перенос архивов
for (BugReport bugReport: sortedBugs){
System.out.println("bugreport_id="+bugReport.id+"/"+bugReport.id_);
File new_home = new File(Global.BugReportsDirectory,String.valueOf(bugReport.id_));
//--
if (!new_home.exists())
FileUtils.forceMkdir(new_home);
//--
Utils.CleanDirectory(new_home);
//--
File old_archive = new File(Global.BugReportsDirectory_OLD, bugReport.id);
File new_archive = new File(new_home,String.valueOf(bugReport.id_)+".zip");
if (old_archive.exists()) {
FileUtils.copyFile(old_archive, new_archive);
}
}
//--
}
}