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 Windows file paths with embbeded FS #90

Merged
merged 2 commits into from
Jul 21, 2024
Merged

Fix Windows file paths with embbeded FS #90

merged 2 commits into from
Jul 21, 2024

Conversation

npinochet
Copy link
Contributor

@npinochet npinochet commented Jun 26, 2024

Fixes #63

File paths for fs.FS and embed.FS are considered valid if the have forward slashes "/", this is consistent with Linux and macOS, but not Windows. To fix this, now all paths are made valid with filepath.ToSlash, except when os.Open is called, where it uses the native OS separator with filepath.FromSlash. I hope this is enough to fix this issue for good.

Thanks for maintaining this great project :)

@npinochet npinochet changed the title Fix Windows file paths with embbeded FS (https://github.com/lafriks/go-tiled/issues/63) Fix Windows file paths with embbeded FS Jun 26, 2024
@lafriks lafriks merged commit 42714e7 into lafriks:main Jul 21, 2024
1 check passed
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.

Issue with embedded file paths
2 participants