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

[1.4][SSP/SMP?]Error With fs.move()

Started by natedogith1, 26 November 2012 - 05:25 PM
natedogith1 #1
Posted 26 November 2012 - 06:25 PM
Not tested on SMP, but probably exists there too.
Version: 1.4

The way fs.move checks to see if two paths are equal seems to be case sensitive, however, platforms like windows have case insensitive paths, this can lead to weird issues with moving a folder inside of itself.

To reproduce issue these commands on a new computercraft computer:
mkdir test
move test Test
AfterLifeLochie #2
Posted 27 November 2012 - 12:07 AM
Not tested on SMP, but probably exists there too. Version: 1.4 The way fs.move checks to see if two paths are equal seems to be case sensitive, however, platforms like windows have case insensitive paths, this can lead to weird issues with moving a folder inside of itself. To reproduce issue these commands on a new computercraft computer: mkdir test move test Test

Just tested this inside an emulation environment, and indeed, this does cause the computer to hang; in fact, so much that Eclipse can't give me a useful error stack.
Cloudy #3
Posted 27 November 2012 - 12:16 AM
Yeah, infinite loop FTL. Will fix by making the check case insensitive in Windows.
Sebra #4
Posted 27 November 2012 - 04:08 AM
Is Windows the only platform with this problem?
AfterLifeLochie #5
Posted 27 November 2012 - 09:00 AM
Is Windows the only platform with this problem?

So it would seem, as both Mac and other OS'es that can run Minecraft use case-insensitive paths.

Unless that's not actually the problem, and is just a way of causing it, which means it could apply everywhere. I imagine most OS'es are smart enough to stop things like directory-inception, but who knows. :P/>
PixelToast #6
Posted 29 November 2012 - 07:57 AM
Is Windows the only platform with this problem?

So it would seem, as both Mac and other OS'es that can run Minecraft use case-insensitive paths.

Unless that's not actually the problem, and is just a way of causing it, which means it could apply everywhere. I imagine most OS'es are smart enough to stop things like directory-inception, but who knows. :P/>
in ubuntu you can do directory inception :3
not sure if its just a link or actual file system inception though