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

fix: PackFile::getBakeOutputDir unable to recognize parent directory of original file with backslash #57

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Starfelll
Copy link

No description provided.

@Starfelll Starfelll closed this Jan 8, 2025
@Starfelll Starfelll reopened this Jan 8, 2025
@craftablescience craftablescience added the bug Something isn't working label Jan 8, 2025
Copy link
Owner

@craftablescience craftablescience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The true fix is fixing up the slashes directly when this->fullFilePath is set in the constructor, as the code assumes everywhere that it's using normalized slashes when it possibly isn't.

This change at L109 should be all that's required to fix the bug:

PackFile::PackFile(std::string fullFilePath_)
-		: fullFilePath(std::move(fullFilePath_)) {}
		: fullFilePath(std::move(fullFilePath_)) {
+	string::normalizeSlashes(this->fullFilePath);
+}

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 this pull request may close these issues.

2 participants