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

On windows there is a "Failed to load dialog" error when starting a dialog with the other fox. #208

Closed
MarcusSakae opened this issue Feb 25, 2023 · 1 comment

Comments

@MarcusSakae
Copy link
Contributor

MarcusSakae commented Feb 25, 2023

The error looks as follow:

Failed to load dialog "dialogs/follower.dlg.ron": No such dialog. Available dialog: ["dialogs\\follower.dlg.ron"]

I'm think the error is because of this line:

let path = format!("dialogs/{}.dlg.ron", dialog_event.dialog.0);

The problem is probably that windows use slashes for path separators.

Suggested solution:

Fix windows, or it that fails maybe try a std::path::Path instead of format string with a slash in it.
maybe something along the lines of:

        let path = Path::new("dialogs")
            .join(&dialog_event.dialog.0)
            .with_extension("dlg.ron")
            .to_string_lossy()
            .to_string();
@janhohenheim
Copy link
Owner

janhohenheim commented Feb 25, 2023

Thanks for the report! Gonna push a fix in a couple of hours

janhohenheim pushed a commit that referenced this issue Feb 4, 2024
Slashes in file-path string gives error on windows. Using std::path::Path should make it viable cross-platform. 
(Note that I've only tested this on windows)

Former-commit-id: 06d0cd2
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

No branches or pull requests

2 participants