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

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

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
@npinochet npinochet force-pushed the main branch 2 times, most recently from 9a4c863 to 853d73c Compare June 27, 2024 00:42
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
1 participant