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

"File path is not safe" #49

Closed
zhongjiedong opened this issue May 23, 2024 · 7 comments
Closed

"File path is not safe" #49

zhongjiedong opened this issue May 23, 2024 · 7 comments

Comments

@zhongjiedong
Copy link

zhongjiedong commented May 23, 2024

v0.17.2-beta

c:\MCServers>mrpack-install "c:\MCServers\mrpacks\Prominence II [RPG] 2.8.4.mrpack" Installing "Prominence II [RPG]" from "c:\\MCServers\\mrpacks\\Prominence II [RPG] 2.8.4.mrpack" to "c:\\MCServers\\mc" File path is not safe: c:\MCServers\mc\mods\do-a-barrel-roll-3.3.7+1.20-fabric.jar

Nothing is created at all so it seems to be failing in the first step

@zhongjiedong
Copy link
Author

something to do with the double \ ?

@nothub
Copy link
Owner

nothub commented May 25, 2024

I just tried to reproduce the issue but I am unable to recreate the problem.

image

I tested both, the current stable (v0.16.10) and the latest beta (v0.17.2).

The commands i executed were:
mrpack-install-0.16.10.exe "C:\Users\Hub\MCServers\mrpacks\Prominence II [RPG] 2.8.4.mrpack"
and
mrpack-install-0.17.2-beta.exe "C:\Users\Hub\MCServers\mrpacks\Prominence II [RPG] 2.8.4.mrpack"

Is the mrpack file you use the unchanged original from modrinth?

@zhongjiedong
Copy link
Author

yep I downloaded from modrinth, specifically the prominence II pack. Can you try and let me know if it works?

@nothub
Copy link
Owner

nothub commented May 25, 2024

Can you try and let me know if it works?

I tried again and I found the issue.

Windows seems to ignore the case of the drive, e.g. c:\MCServers and C:\MCServers point to the same location.
This causes a bug somewhere in the path validation.

For now, make sure your working directory is C:\MCServers and not c:\MCServers to circumvent the problem.

I gonna test a few ways to approach this issue.

image

@nothub
Copy link
Owner

nothub commented May 25, 2024

I created a new release v0.17.3-beta which solves the problem for me. @zhongjiedong can you verify that the new version also fixes the problem on your side?

@zhongjiedong
Copy link
Author

Fixed the issue, thanks so much!

@nothub
Copy link
Owner

nothub commented May 25, 2024

Awesome 😃 Thank you for reporting the issue!

@nothub nothub closed this as completed May 25, 2024
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

No branches or pull requests

2 participants