rojo-rbx / rbxlx-to-rojo

Tool to one time convert Roblox places to Rojo projects
Mozilla Public License 2.0
175 stars 35 forks source link

"can't create default.project.json" panic when exporting a place with no scripts #26

Open Jaguar-515 opened 5 years ago

Jaguar-515 commented 5 years ago

After I select a folder, it returns this error:

thread 'main' panicked at 'can't create default.project.json: Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." }', src\libcore\result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Is this a normal error or did I do something wrong?

Kampfkarren commented 5 years ago

That's weird, can you record a video of you reproducing this?

Jaguar-515 commented 5 years ago

Alright, will do.

Jaguar-515 commented 5 years ago

image Is an image ok? I don't want to reveal my real name for privacy reasons.

Kampfkarren commented 5 years ago

It's tough for me to help since I don't know what you're actually doing to select the folder. Can you screenshot what you're selecting before it crashes?

Jaguar-515 commented 5 years ago

image I am attempting to select this place. image I am attempting to select this folder.

Kampfkarren commented 5 years ago

If you create a src folder in the folder, does this still happen?

Jaguar-515 commented 5 years ago

image image Yes.

Kampfkarren commented 5 years ago

That's super strange, it comes from this code:

https://github.com/rojo-rbx/rbxlx-to-rojo/blob/11636ed2d0ef0bb80579d0bc761ad56fcb488733/src/filesystem.rs#L99-L108

self.root uses the same path as self.source so writing to there SHOULD error first--I suppose there isn't anything in the src directory either, though?

Also, I'm assuming the place file actually has scripts inside it?

Jaguar-515 commented 5 years ago

The place file does not have any scripts inside it. image

Kampfkarren commented 5 years ago

That might be why. It's still weird that happens since there's tests to make sure that empty places work, but can you check if it works with places with scripts for you? For the time being, rbxlx-to-rojo is only useful for places with scripts anyhow.

Jaguar-515 commented 5 years ago

Alright, I'll do that.

Jaguar-515 commented 5 years ago

It works with places with scripts. Oddly, it doesn't work with places without scripts. image

Kampfkarren commented 5 years ago

It's strange that this happens, but it's not a huge priority for me since you shouldn't be using this with places without scripts right now anyway.

If you're starting a place fresh, just learn how to setup Rojo on your own.

Jaguar-515 commented 5 years ago

Alright. I already know how to setup Rojo on my own.