diff --git a/src/main/java/dev/skydynamic/quickbackupmulti/utils/MakeUtils.java b/src/main/java/dev/skydynamic/quickbackupmulti/utils/MakeUtils.java index 1334ca8..d767eef 100644 --- a/src/main/java/dev/skydynamic/quickbackupmulti/utils/MakeUtils.java +++ b/src/main/java/dev/skydynamic/quickbackupmulti/utils/MakeUtils.java @@ -2,7 +2,10 @@ import dev.morphia.query.filters.Filters; import dev.skydynamic.quickbackupmulti.config.Config; -import dev.skydynamic.quickbackupmulti.storage.*; +import dev.skydynamic.quickbackupmulti.storage.BackupInfo; +import dev.skydynamic.quickbackupmulti.storage.DimensionFormat; +import dev.skydynamic.quickbackupmulti.storage.FileHashes; +import dev.skydynamic.quickbackupmulti.storage.IndexFile; import net.minecraft.server.MinecraftServer; import net.minecraft.server.command.ServerCommandSource; import net.minecraft.server.world.ServerWorld; @@ -15,8 +18,8 @@ import java.util.*; import static dev.skydynamic.quickbackupmulti.QuickBackupMulti.LOGGER; -import static dev.skydynamic.quickbackupmulti.i18n.Translate.tr; import static dev.skydynamic.quickbackupmulti.QuickBackupMulti.getDataBase; +import static dev.skydynamic.quickbackupmulti.i18n.Translate.tr; import static dev.skydynamic.quickbackupmulti.utils.QbmManager.*; import static dev.skydynamic.quickbackupmulti.utils.ScheduleUtils.startSchedule; import static dev.skydynamic.quickbackupmulti.utils.hash.HashUtils.compareFileHash; @@ -168,12 +171,14 @@ public static int make(ServerCommandSource commandSource, String name, String de if (file.getName().equals("DIM1") || file.getName().equals("DIM-1")) { // 如果是文件夹(原版情况下一般只有文件夹了xwx, 但还是要判断) if (dirFile.isDirectory()) { + // 使用DIM的目标文件夹 + File dimDestDir = getBackupDir().resolve(name + "/" + file.getName()).toFile(); // 初始化 hashMap = new HashMap<>(); indexMap = new HashMap<>(); for (File dirFile1 : dirFile.listFiles()) { // 该处同root与别的文件夹 - HashMap resultMap = compareAndIndex(firstBackup, latestBackupName, fileHashedDocument, indexFileDocument, dirFile1, destDir, hashMap, indexMap, indexBackupList); + HashMap resultMap = compareAndIndex(firstBackup, latestBackupName, fileHashedDocument, indexFileDocument, dirFile1, dimDestDir, hashMap, indexMap, indexBackupList); hashMap = (HashMap) resultMap.get("hash"); indexMap = (HashMap) resultMap.get("index"); indexBackupList = (List) resultMap.get("indexBackupList");