From 3b7ee3974c70375474b7fac77dfc680657291416 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 14 Aug 2017 02:46:07 -0400 Subject: [PATCH] Don't set readonly if PHYSFS_stat()'ing something not in the write dir. 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. --- src/physfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/physfs.c b/src/physfs.c index f7ff9a21..5bea2079 100644 --- a/src/physfs.c +++ b/src/physfs.c @@ -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;