This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Sewbacca's profile picture

FSector resolves mounted paths wrong

Started by Sewbacca, 10 October 2016 - 02:35 PM
Sewbacca #1
Posted 10 October 2016 - 04:35 PM
Hey guys,

If you didn't saw it right now, i refer to my post FSector.
To test FSector, i wanna redirect the fs and run a program by shell.run to test if FSector works correctly.

local root = FSector.create(fs.current(), '')
root.mount('rom', '.customFolder/rom')
fs.redirect(FSector.create(root, '.customFolder/BIOS'))
shell.run('rom/programs/shell', '')
fs.redirect(fs.native())
First, i tried shell, but both errors with No such program.
After a few 'prints', i get at the end paths like:
rom/porgrams/rom/programs/ls and rom/porgrams/advanced/rom/programs/ls.
I have no more ideas.
I hope somebody can help me =)
Sewbacca
Edited on 12 October 2016 - 11:28 AM
Bomb Bloke #2
Posted 11 October 2016 - 05:18 AM
Can you at least narrow it down to a function, and provide sample input for that function along with expected + actual output?
Lupus590 #3
Posted 11 October 2016 - 09:50 AM
for functions which don't return a value, does the state of the virtual file system change as expected? - you are debugging feel free to dump it in a global so you can view the raw data
Sewbacca #4
Posted 12 October 2016 - 01:23 PM
I often print out the data, but the problem doesn't was mounted path, just fs.isDir ^_^/> , i used copy and paste, because i am lazy and i forgot to change fs.getFreeSpace into fs.isDir ^^. I update the code on pastebin in a few minutes/seconds.
Edited on 12 October 2016 - 11:52 AM