From 0287160f3c2e1150cd20e4ea608067a55f3a613c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 6 Aug 2017 13:56:45 -0400 Subject: [PATCH] Removed some FIXMEs that aren't valid. --- src/physfs.c | 4 ++-- src/physfs_archiver_zip.c | 2 -- src/physfs_platform_macos.c | 2 +- src/physfs_platform_posix.c | 3 +-- src/physfs_platform_unix.c | 2 -- src/physfs_platform_windows.c | 3 --- 6 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/physfs.c b/src/physfs.c index 29320ba2..d1db10c8 100644 --- a/src/physfs.c +++ b/src/physfs.c @@ -2882,7 +2882,7 @@ int PHYSFS_stat(const char *_fname, PHYSFS_Stat *stat) stat->createtime = -1; stat->accesstime = -1; stat->filetype = PHYSFS_FILETYPE_OTHER; - stat->readonly = 1; /* !!! FIXME */ + stat->readonly = 1; if (sanitizePlatformIndependentPath(_fname, fname)) { @@ -2904,7 +2904,7 @@ int PHYSFS_stat(const char *_fname, PHYSFS_Stat *stat) if (exists) { stat->filetype = PHYSFS_FILETYPE_DIRECTORY; - stat->readonly = 1; /* !!! FIXME */ + stat->readonly = 1; retval = 1; } /* if */ else if (verifyPath(i, &arcfname, 0)) diff --git a/src/physfs_archiver_zip.c b/src/physfs_archiver_zip.c index 93f795fc..c7941ef9 100644 --- a/src/physfs_archiver_zip.c +++ b/src/physfs_archiver_zip.c @@ -1637,8 +1637,6 @@ static int ZIP_stat(void *opaque, const char *filename, PHYSFS_Stat *stat) ZIPinfo *info = (ZIPinfo *) opaque; const ZIPentry *entry = zip_find_entry(info, filename); - /* !!! FIXME: does this need to resolve entries here? */ - if (entry == NULL) return 0; diff --git a/src/physfs_platform_macos.c b/src/physfs_platform_macos.c index 3b790147..20f9e322 100644 --- a/src/physfs_platform_macos.c +++ b/src/physfs_platform_macos.c @@ -1,5 +1,5 @@ /* - * Mac OS X support routines for PhysicsFS. + * macOS (iOS, etc) support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * diff --git a/src/physfs_platform_posix.c b/src/physfs_platform_posix.c index cc0e644c..3a76e333 100644 --- a/src/physfs_platform_posix.c +++ b/src/physfs_platform_posix.c @@ -331,8 +331,7 @@ int __PHYSFS_platformStat(const char *filename, PHYSFS_Stat *st) st->createtime = statbuf.st_ctime; st->accesstime = statbuf.st_atime; - /* !!! FIXME: maybe we should just report full permissions? */ - st->readonly = access(filename, W_OK); + st->readonly = (access(filename, W_OK) == -1); return 1; } /* __PHYSFS_platformStat */ diff --git a/src/physfs_platform_unix.c b/src/physfs_platform_unix.c index 73bba5ca..d8520a1e 100644 --- a/src/physfs_platform_unix.c +++ b/src/physfs_platform_unix.c @@ -118,8 +118,6 @@ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) else if (strcmp(ent->mnt_type, "supermount") == 0) add_it = 1; - /* !!! FIXME: udf? automount? */ - /* add other mount types here */ if (add_it) diff --git a/src/physfs_platform_windows.c b/src/physfs_platform_windows.c index 470eb1a3..1593ffa5 100644 --- a/src/physfs_platform_windows.c +++ b/src/physfs_platform_windows.c @@ -196,7 +196,6 @@ static PHYSFS_ErrorCode errcodeFromWinApiError(const DWORD err) case ERROR_WRITE_FAULT: return PHYSFS_ERR_IO; case ERROR_READ_FAULT: return PHYSFS_ERR_IO; case ERROR_DEV_NOT_EXIST: return PHYSFS_ERR_IO; - /* !!! FIXME: ?? case ELOOP: return PHYSFS_ERR_SYMLINK_LOOP; */ case ERROR_BUFFER_OVERFLOW: return PHYSFS_ERR_BAD_FILENAME; case ERROR_INVALID_NAME: return PHYSFS_ERR_BAD_FILENAME; case ERROR_BAD_PATHNAME: return PHYSFS_ERR_BAD_FILENAME; @@ -207,8 +206,6 @@ static PHYSFS_ErrorCode errcodeFromWinApiError(const DWORD err) case ERROR_INVALID_DRIVE: return PHYSFS_ERR_NOT_FOUND; case ERROR_HANDLE_DISK_FULL: return PHYSFS_ERR_NO_SPACE; case ERROR_DISK_FULL: return PHYSFS_ERR_NO_SPACE; - /* !!! FIXME: ?? case ENOTDIR: return PHYSFS_ERR_NOT_FOUND; */ - /* !!! FIXME: ?? case EISDIR: return PHYSFS_ERR_NOT_A_FILE; */ case ERROR_WRITE_PROTECT: return PHYSFS_ERR_READ_ONLY; case ERROR_LOCK_VIOLATION: return PHYSFS_ERR_BUSY; case ERROR_SHARING_VIOLATION: return PHYSFS_ERR_BUSY;