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

system: load <libpath>/../pkg if <libpath>/pkg doesn't exist but <libpath>/../pkg does #1413

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

illwieckz
Copy link
Member

Load <libpath>/../pkg if <libpath>/pkg doesn't exist but <libpath>/../pkg does.

This to workaround the fact most file browsers will create a subfolder when extracting an archive that doesn't contain one.

This makes Unvanquished_0.56.0/linux-amd64/daemon load Unvanquished_0.56.0/pkg the same way Unvanquished_0.56.0/daemon loads Unvanquished_0.56.0/pkg.

@illwieckz
Copy link
Member Author

Using FS::RawPath::ListFiles() is overkill but we don't have yet a dedicated function to test that a directory exists.

@slipher
Copy link
Member

slipher commented Nov 4, 2024

I'm against it. Going into .. to look for resources seems like a fishy and insecure design.

Curiously, this could cause a build in Unvanquished/build to automatically find the repository's pkg/. This could seem "convenient" but I think it is a bad idea. I don't want stuff to unpredictably change behavior based on how you choose the build dir. And testing with only released assets is an often desired use case.

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.

2 participants