cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
932 stars 211 forks source link

`run code` function does not work in the editor when using it on floppy disk .lua file #1094

Closed Skreperiukas closed 2 years ago

Skreperiukas commented 2 years ago

Minecraft Version

1.16.x

Version

1.100.3

Details

Everything is told in the title so I will proceed with recreation:

  1. Place computer (I used advanced one) and a disk drive next to it.
  2. Insert the floppy disk.
  3. cd disk - > edit hi.
  4. Type any code which should work. Example: term.write("Hello").
  5. Press run function.
  6. It gives: "No such program" inside the editor. adawdfawfafd
Wojbie commented 2 years ago

I can't do better testing on phone but i determined what if you run cd disk - > edit hi. then this issue will happen but if one does edit disk/hi while at root folder then it will not. I must have missed something with current directory when updating run option in edit in last commit.

EDIT: My dummy. Forgot to prepend path given to shell.openTab with / to indicate its absolute path.

Wojbie commented 2 years ago

I stand corrected. I didn't forget.

https://github.com/cc-tweaked/CC-Tweaked/pull/723/commits/afc67ec85fb71b71a4e19e6a7f5d232ac5d3bdf6