Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory DIM1 and DIM-1 not backed up #23

Closed
2 tasks done
GrapeSkin2191 opened this issue May 18, 2024 · 5 comments · Fixed by #15
Closed
2 tasks done

Directory DIM1 and DIM-1 not backed up #23

GrapeSkin2191 opened this issue May 18, 2024 · 5 comments · Fixed by #15
Labels
bug Something isn't working

Comments

@GrapeSkin2191
Copy link

GrapeSkin2191 commented May 18, 2024

Bug description / Bug描述

创建增量备份时,DIM1和DIM-1文件夹(即末地和下界)的数据不会被增量保存,导致回档后下界和末地数据丢失
latest.log

Steps to reproduce / 复现步骤

  1. 创建世界并进入下界或末地
  2. 执行/qb make
  3. 在主世界、下界、末地放置一些方块
  4. 执行/qb make
  5. 执行/qb back ...到最近的备份

Expected behavior / 预期行为

下界、末地的数据被保存,可以看到最近放置的方块

Actual behavior / 实际情况

可以看到主世界的方块,不能在下界、末地看到,且在第二个备份文件中缺失DIM1与DIM-1

Relevant logs / 相关日志

No response

Minecraft version / Minecraft版本

1.20.1

Mod version / Mod版本

2.0.2

Other information / 其他信息

Running on clean fabric 0.15.11, with fabric-api-0.92.1+1.20.1.jar, QuickBackupMulti-mc1.20-v2.0.2.jar and no other mods.
Java: openjdk version "17.0.9" 2023-10-17, IBM Semeru Runtime Open Edition 17.0.9.0 (build 17.0.9+9)

Check list

  • I have verified that the issue persists in the latest version of the mod. / 该mod版本的问题在最新版本的mod中依旧存在
  • I have searched the existing issues and confirmed that this is not a duplicate. / 我查看了现有issues并确保该问题不是重复的
@GrapeSkin2191 GrapeSkin2191 added the bug Something isn't working label May 18, 2024
@GrapeSkin2191
Copy link
Author

似乎在QuickBackupMulti-mc1.20-v2.0.5+build.77.jar(最新action)中仍然存在

@GrapeSkin2191
Copy link
Author

image
可能由copyFileAndMakeDirs引发,如图,若文件为世界名\DIM1\region\r.0.0.mca,则targetDir会被错误的赋为备份名\region,而非备份名\DIM1\region,如此,下界与末地的文件会被复制到主世界文件中。

@GrapeSkin2191
Copy link
Author

GrapeSkin2191 commented May 18, 2024

File "dev/skydynamic/quickbackupmulti/utils/MakeUtils.java", line 36, in copyFileAndMakeDirs:

File targetDir = new File(
                        destDir,
                        file.toString().substring(
                                file.toString().lastIndexOf(Config.TEMP_CONFIG.worldName) + Config.TEMP_CONFIG.worldName.length() + 1,
                                file.toString().lastIndexOf(file.getName())
                        )
                );

可能的解决方案,找到存档根文件夹后提取后面经过的所有文件夹,如此可以正确复制(本人码力极低,java不是很熟,见谅)。

另外,由于存档文件夹名称可以修改且不影响世界名称,Config.TEMP_CONFIG.worldName是否不一定与存档文件夹名称相同,从而可能导致问题?

@GrapeSkin2191
Copy link
Author

或者可以特判 DIM1 & DIM-1

@SkyDynamic
Copy link
Collaborator

另外,由于存档文件夹名称可以修改且不影响世界名称,Config.TEMP_CONFIG.worldName是否不一定与存档文件夹名称相同,从而可能导致问题?

不会,除非你在备份之后又一次修改了文件夹,但这样只会让mod重新创建一个备份文件夹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants