65 posts
Location
Hesse, Germany
Posted 22 May 2019 - 04:29 PM
I am currently working on a bootloadee that runs OSes in a Sandbox.
To do this I override every single function in fs to prefix the root directory.
This works like a charm for my applications (Empam) but as soon as I try to run OneOS the system crashes because of „Loop in gettable“
I did some reading and found out that it‘s appearantly caused by setfenv.
_G and setfenv is a big magic box to me, so how would I implement this properly?
7083 posts
Location
Tasmania (AU)
Posted 22 May 2019 - 05:39 PM
To do this I override every single function in fs to prefix the root directory.
Just glancing through the
fs API, this looks like it'll at least break
fs.combine() and
fs.complete().
It's very difficult to comment on your issue without seeing the relevant lines in OneOS in addition to your own code.
1426 posts
Location
Does anyone put something serious here?
Posted 22 May 2019 - 05:41 PM
If your bootloader is just overwriting the fs library, I'd be surprised if this is an issue on your end - you'd need to start messing around with metatables for this to really be an issue. That said, without seeing your code, there's a limited amount we can really say.
Can you run OneOS without your bootloader? I've had issues getting it to run on recent versions of ComputerCraft, though can't remember the specifics.
65 posts
Location
Hesse, Germany
Posted 22 May 2019 - 10:23 PM
@Bomb Bloke
Sorry, not every function. Fs.complete and fd.combine remain vailla.
@squiddev I‘m nor sure but I‘ll send you a github link.
65 posts
Location
Hesse, Germany
Posted 23 May 2019 - 12:21 PM
Here you go:
https://github.com/MrObsidy/CC-PBLThe file of interest is /pbl/mounter
65 posts
Location
Hesse, Germany
Posted 23 May 2019 - 01:39 PM
IMPORTANT EDIT:
Yeah, it was OneOS all along. My code worked…