Skip to content

fix(XP3): open source files by their original relative path when packing - #231

Closed
lxl66566 wants to merge 1 commit into
crskycode:masterfrom
lxl66566:xp3-fix1
Closed

lxl66566 wants to merge 1 commit into
crskycode:masterfrom
lxl66566:xp3-fix1

Conversation

@lxl66566

Copy link
Copy Markdown

对文件夹打包 xp3 时,若「保持目录结构」未勾选(默认值),则会报错。

PixPin_2026-09-26_11-21-48.mp4

已在最新 master 上复现。

预期结果:打包成功,包内所有文件平铺在根目录

@crskycode

Copy link
Copy Markdown
Owner

This is expected behavior; it's just that GARbro's error message is misleading. When you want to create an XP3 file with a flat structure, you shouldn't select one (or more) subdirectories in the list, or select files and subdirectories at the same time, as this implies that GARbro will flatten the files inside those subdirectories. This behavior is quite strange, and perhaps we should revise that error message, or simply ignore the subdirectories (and the files inside them).

@craftwar

Copy link
Copy Markdown

I thought this option was meant to create a patch.xp3 archive with a flat directory structure. If not, what is it for?

@crskycode

Copy link
Copy Markdown
Owner

I thought this option was meant to create a patch.xp3 archive with a flat directory structure. If not, what is it for?

Yes, a flattened XP3 file is essentially just patch.xp3, so we shouldn't select any subdirectories when creating patch.xp3

@craftwar

craftwar commented Oct 12, 2026 •

Copy link
Copy Markdown

I thought this option was meant to create a patch.xp3 archive with a flat directory structure. If not, what is it for?

Yes, a flattened XP3 file is essentially just patch.xp3, so we shouldn't select any subdirectories when creating patch.xp3

If I select only files and no directories, I can create a flat XP3 archive regardless of whether this option is checked. However, I want to keep my source files organized in their original directory structure while creating a flat XP3 archive, without having to move all the files into a single directory. Preserving the original directory structure makes it easier to compare files. This PR would make the process much more convenient.

Do you see any potential issues this PR might introduce?

@crskycode crskycode closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants