Author Topic: Some recent change in fileObjects breaks them [OS-related?]  (Read 3522 times)

Ensure that your filepath is less than 255 characters: https://en.wikipedia.org/wiki/HFS_Plus

"config/client/BCL/chatLogs/ScriptingTaco's Server/07-15-15.txt" is 62 characters.

Do some manual testing.

Code: [Select]
%fo = new fileObject();
%fo.openForWrite("config/test.txt");
%fo.write("Testing!");
%fo.close();
%fo.delete();
echo(isFile("config/test.txt"));

"config/client/BCL/chatLogs/ScriptingTaco's Server/07-15-15.txt" is 62 characters.

That's not the full path though.

That's not the full path though.

"/Users//Documents/Blockland/config/client/BCL/chatLogs/ScriptingTaco's Server/07-15-15.txt" leaves 165 characters for a username.

"/Users//Documents/Blockland/config/client/BCL/chatLogs/ScriptingTaco's Server/07-15-15.txt" leaves 165 characters for a username.
dannu is using a mac os, not a windows one, so the absolute path is most likely diffrent

dannu is using a mac os, not a windows one, so the absolute path is most likely diffrent

That absolute path is mac os-type. On windows it would start with the drive name (usually C) and a colon.

This is still a problem and a big one.

I am currently helping test PTG, but I was having a lot of trouble. Turns out it needs to make folders for cache operations. The problem 100% is that for whatever reason Blockland in unable to create new folders, when all the folders are already there so all Blockland needs to create is the file itself, everything is fine and dandy. I PM-ed Badspot when I first created this topic, but nothing.

Do some manual testing.

Code: [Select]
%fo = new fileObject();
%fo.openForWrite("config/test.txt");
%fo.write("Testing!");
%fo.close();
%fo.delete();
echo(isFile("config/test.txt"));

Did that work? Did it echo 1 or 0?

I can write files into existing folders just fine.

Can someone with an OS X that doesn't have this issue try to recreate the problem using a steam installation?

Wait, so the issue is creating directories? So then, this doesn't work?

Code: [Select]
%fo = new fileObject();
%fo.openForWrite("config/test/test.txt");
%fo.write("Testing!");
%fo.close();
%fo.delete();
echo(isFile("config/test/test.txt"));


Works for me running on OSX (except I accidentally used FileObject::write in that code which isn't a function, it's FileObject::writeLine) but I'm not running the Steam version.

Can you please try it out using the steam version? Also, what OSX version are you running?

Doesn't work on Steam version.