Skip to content

Commit

Permalink
Don't set readonly if PHYSFS_stat()'ing something not in the write dir.
Browse files Browse the repository at this point in the history
This API is meant to report what the archivers think about an item and not
actually tell you if a PHYSFS_openWrite() will succeed on it.
  • Loading branch information
icculus committed Aug 14, 2017
1 parent 63277e5 commit 3b7ee39
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/physfs.c
Expand Up @@ -3011,9 +3011,6 @@ int PHYSFS_stat(const char *_fname, PHYSFS_Stat *stat)
} /* if */
else if (verifyPath(i, &arcfname, 0))
{
/* !!! FIXME-3.0: this test is wrong and should be elsewhere. */
stat->readonly = !(writeDir &&
(strcmp(writeDir->dirName, i->dirName) == 0));
retval = i->funcs->stat(i->opaque, arcfname, stat);
if ((retval) || (currentErrorCode() != PHYSFS_ERR_NOT_FOUND))
exists = 1;
Expand Down

0 comments on commit 3b7ee39

Please sign in to comment.