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

[BUG] Error locating destination directory for project #149

Open
LordPatate opened this issue Aug 14, 2024 · 8 comments
Open

[BUG] Error locating destination directory for project #149

LordPatate opened this issue Aug 14, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@LordPatate
Copy link
Contributor

Describe the bug

Creating a new project fails on Windows with message : "Error locating destination directory for project".
I suspect the problem to be simply an UNIX-style path for the .luminol/config file instead of a platform-agnostic path.

Trying to re-open the project will fail.

To Reproduce

Steps to reproduce the behavior:

  1. Click "New Project"
  2. (Probably optional) Rename project
  3. (Probably optional) Enable "Initialize a git repository"
  4. (Probably optional) Rename default branch to "main"
  5. Select an empty folder
  6. Click OK

Backtrace

2024-08-14T16:46:11.822772Z ERROR luminol_core: Luminol error:
   0: Error locating destination directory for project
   1: While writing .luminol/config
   2: While opening file "G:\\LuminolProjects\\.luminol/config" in a host folder
   3: The system cannot find the path specified. (os error 3)

Location:
   D:\a\Luminol\Luminol\crates\filesystem\src\native.rs:118

Luminol version: 1140aa2

image

When I tried re-opening the project:

2024-08-14T16:47:21.650137Z ERROR luminol_core: Luminol error:
   0: Error opening the project
   1: While loading project data
   2: While loading project configuration
   3: Unable to detect the project's RPG Maker version (perhaps you did not open an RPG Maker project?

Location:
   crates\filesystem\src\project.rs:163

Luminol version: 1140aa2

Expected behavior

Creating a new project without errors :)

Desktop

  • OS: Windows 11 Home
  • OS Version: 23H2

Additional context

Just grabbed the windows build from the latest autobuild deployment pipeline.

I'm a developer, I'll try to take a look, see if I can find the problem and open a PR for it.

@LordPatate LordPatate added the bug Something isn't working label Aug 14, 2024
@melody-rs
Copy link
Member

melody-rs commented Aug 14, 2024

Does opening an existing project work?

@melody-rs melody-rs self-assigned this Aug 14, 2024
@melody-rs
Copy link
Member

It'll take me a bit to get to testing this because I run Linux and booting into Windows is a hassle, but I'll take a look into this

@LordPatate
Copy link
Contributor Author

Does opening an existing project work?

I have no idea, I don't think I'm able to check since I don't have any existing project on my computer.

@LordPatate
Copy link
Contributor Author

I found 8 results for a hardcoded string ".luminol/config" which is probably not the right way to join paths in Rust, right?
image
I see that the path.join(path) method exists on several occurrences. I'm guessing that's how Luminol got the first part of the path right? (G:\\LuminolProjects\\.luminol/config)

        let path = self.root_path.join(path.as_ref());

@melody-rs
Copy link
Member

The problem is a but more complicated than that- Luminol has an internal filesystem that's supposed to accept paths that either contain / or \ (or a mix of both) and that seems to be breaking. Windows actually can handle / paths, but it still hands out \ whenever querying what's inside a folder.

@melody-rs
Copy link
Member

melody-rs commented Aug 15, 2024

Interesting, opening a pre-existing project works just fine (even one without the .luminol folder)

@LordPatate
Copy link
Contributor Author

Interesting, opening a pre-existing project works just fine (even one without the .luminol folder)

What if you try to save the pre-existing project that did not have .luminol folder? I suspect it will try to write the .luminol/config at save time.

@melody-rs
Copy link
Member

melody-rs commented Aug 15, 2024

Interesting, opening a pre-existing project works just fine (even one without the .luminol folder)

What if you try to save the pre-existing project that did not have .luminol folder? I suspect it will try to write the .luminol/config at save time.

It actually writes when opening a project without the config file present. This is because the editor has to guess the script path, which will tweak the project, and we'd rather guess the script path only once

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

No branches or pull requests

2 participants