• Advertisement
Sign in to follow this  

PhysFS reads/writes result "access denied"

This topic is 4523 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I tried to make little modifications to TinyXML so it could use PhysFS for reading and writing but I all attempts to read/write result error "access denied". Sounds like Linux problem but I have Windows 2000. What am I doing wrong? Edit: Modified loading code

Share this post


Link to post
Share on other sites
Advertisement
Now I have set the write dir but still get error from PHYSFS_read. This time "Archive is read-only". Why am I getting this when I am trying to read a file?

Edit: Ok, it seems that this error comes from PHYSFS_setWriteDir but I can't still see why. The directory I'm trying to set write dir is not "read-only".

[Edited by - olberg on September 2, 2005 4:21:00 AM]

Share this post


Link to post
Share on other sites
I tried setting write directory to NULL this time. Now I think I have found where the problem is.

This part of my code does what it should do:

while(PHYSFS_read( file, buf, sizeof(char), 2048 )>0)
{
data += buf;
}

(data.c_str() returns exactly the file I read)

This...

if(!Parse( data.c_str(), 0, encoding ))
{
LOG("Parsing failed.\nPHYSFS_getLastError: ");
LOG(PHYSFS_getLastError());
LOG("\n");
}

...doesn't give any errors (I assumed from sources that it returns zero on error) but still TiXmlDocument doesn't contain anything.

If I try to load the .xml-file with TiXmlDocument::LoadFile it works perfectly but with my version it doesn't work. I pass the same file to Parse()-function but it doesn't seem to work.

Quote:
Original post by evolutional
Hey cool, I made the same modification a while ago ;)


Can you show how you did it?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement