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

0.24.0-beta-03 When compiled on windows, android assets use \ instead of / for folder paths #700

Closed
Syer10 opened this issue May 9, 2024 · 1 comment · Fixed by #706
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Syer10
Copy link
Contributor

Syer10 commented May 9, 2024

I was having a issue with using my assets on windows in the beta, I found the reason was the folder separators.

Example:
moko-resources/assets/text/test.txt
Gets compiled to:

public actual val test_txt: AssetResource = AssetResource(path =
          "text\\test.txt")

Where it should be

public actual val test_txt: AssetResource = AssetResource(path =
          "text/test.txt")

I'm able to hack around it by doing this

    val asset = AssetResource(
        asset.path.replace("\\", "/")
    )
@Alex009 Alex009 added this to the 0.24.0 milestone May 10, 2024
@Alex009 Alex009 added the bug Something isn't working label May 10, 2024
Alex009 added a commit that referenced this issue May 15, 2024
@Alex009 Alex009 linked a pull request May 15, 2024 that will close this issue
@Alex009
Copy link
Member

Alex009 commented May 15, 2024

Fixed in 0.24.0-beta-4

@Alex009 Alex009 closed this as completed May 15, 2024
@Alex009 Alex009 mentioned this issue Jun 9, 2024
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 a pull request may close this issue.

3 participants