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

I am using Mac OS X 10.9.4 (13E28) kernel version Darwin 13.3.0. So now that we're past the formalities, let's dive into it.

I first noticed this issue in my chat logger. It isn't the prettiest thing but it has worked well for some time now. Example of some servers it has worked with To give a little bit of context on how long I have been using it, it also logs every BL_ID i meet in a seperate .txt file and stores the different names I meet them as into them, it has collected a total of 10 332 ID-s. I've deducted the issue to be as follows, something in the past weeks has changed and openForWrite and openForAppend can't create new folders like they used to. Now, every time it tries to open a file for write in an nonexistent folder, the console spits out an OS error that goes as follows:
Quote
ResManager::openFileForWrite - failed to open stream for "config/client/BCL/chatLogs/ScriptingTaco's Server/07-15-15.txt"

This is the chat logger

Works fine for me. I'm running 10.6.8.

Quite a large gap between 10.6 and 10.9 though.

Make sure that your files permissions are okay.

That was my first instinct as well, all seems to be in order.

You have an apostrophe in the file path. Get rid of that.

You have an apostrophe in the file path. Get rid of that.

Huh?

Example of some servers it has worked with

There's plenty of apostrophes here and plenty of other special characters.

There's a chance you might not have closed the object's read/write stream correctly. Have you looked at that?

I just realized I can give quite an accurate date when this problem started occurring. The last entry to my chat logs was in May 31-st.

I have worked through all of that already. The case that prompted me to work with this problem was when I was working on my gamemode and a straight-forward saving/loading script was encountering the same result.

Hm, have you tried to open the file while blockland is up? (Not opening in blockland)


Code: [Select]
ScriptingTaco's Server
you might want to have that be escaped

Code: [Select]
ScriptingTaco\'s Server

Port already pointed out the screenshot I posted about this working many times already.

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