ComputerCraft

ComputerCraft

21M Downloads

Can't open file with ":" in the name

SoniEx2 opened this issue · 4 comments

commented

I made some files "player:nbs.lua" "player:monitor.lua" etc, and they can't be opened with fs.open(). Trying to make a file "player:test.lua" from in-game removes the ":".

EDIT: Why I want to use ":"? Well, MC items are named e.g. "minecraft:stone", so I decided to name my files like that because it's better.

commented

I'm on Linux. Please expose the underlying FS's name rules.

commented

doesn't matter that you're on Linux, ComputerCraft/Minecraft is cross-platform, colons shouldn't be used. Just replace : with _.

Here are some other things that shouldn't be used

commented

https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247%28v=vs.85%29.aspx

On Sun, May 17, 2015 at 7:43 PM, Soni L. [email protected] wrote:

I made some files "player:nbs.lua" "player:monitor.lua" etc, and they
can't be opened with fs.open(). Trying to make a file "player:test.lua"
from in-game removes the ":".


Reply to this email directly or view it on GitHub
#11.

commented

Ok... Alternatively check if the file exists as-is on the FS, if so (and you're trying to read it) then use it, otherwise act "normally" (aka brokenly).