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

[1.33][SSP] fs.getDrive always returns "hdd"

Started by MysticT, 13 May 2012 - 11:43 PM
MysticT #1
Posted 14 May 2012 - 01:43 AM
ComputerCraft Version Information: 1.33 Client

Description of Bug:
Calling the fs.getDrive() function always return "hdd" (hard drive, on the computer) even if you give it a disk path.

Steps to Reproduce Bug:
1) Create a computer, a disk drive and a floppy disk.
2) Place the computer with the disk drive on a side.
3) Insert the floppy in the drive.
4) Type "drive disk" on the computer and press enter.
It will say "hdd", when it should say "disk", "drive" or something else that represents the disk drive.

Not tested on SMP.
Dirkus7 #2
Posted 14 May 2012 - 08:27 PM
Hmm it doesn't work for the disk, but if you type "drive rom" it returns rom
Cloudy #3
Posted 14 May 2012 - 08:29 PM
I'll look into it for you.

Edit: Looked into it - doesn't seem like a "straight forward" fix as since the original code was written, the peripheral API has been added, and disk drives are peripherals.

Is it a big issue in some code that you're doing? Surely, detecting if a disk drive is on the side, and getting the mount path should be enough to detect if a folder is a disk drive.
PixelToast #4
Posted 25 May 2012 - 04:20 AM
having this problem too :/
Cloudy #5
Posted 25 May 2012 - 09:28 AM
I ask again - is it a big issue? I could fix it, but it would take a rewrite of parts of the code.