Ryan C. Gordon
f8f89035c4
Bumped version to 3.0.2!
2019-03-18 14:35:44 -04:00
Ryan C. Gordon
2dc2dd1b04
Fixed compiler warning.
...
(transplanted from b76a47b006f65ad81b54256080d485919abdce29)
2019-03-18 14:28:46 -04:00
Ryan C. Gordon
81bb11ddbc
windows: Workaround for WinXP systems.
2019-03-18 13:36:16 -04:00
Ryan C. Gordon
fa34bb479d
Only flush file handles on close if they were opened for writing.
...
(transplanted from 89e1b79e10c6e9faf9e4c06dc357dee5ef2c7d4f)
2019-03-18 11:27:26 -04:00
Ryan C. Gordon
0d3d0afc9a
Allow builds to opt-out or opt-in to specific archivers, whichever's easier.
...
(transplanted from ff8f4c2a60d8bea12e34c1ed5cb4f506efb39020)
2019-01-26 03:00:29 -05:00
Ryan C. Gordon
20da8fab65
PHYSFS_flush() shouldn't call PHYSFS_Io::flush().
...
The former is meant to send PhysicsFS-buffered data to the PHYSFS_Io's
implementation, the latter is meant to tell the OS to definitely make sure the
data is safely written to disk (or at least, that's what it does in practice).
This was making PHYSFS_setBuffer()'d handles _slower_, since they would end
up blocking whenever the buffer was full until the data made the full trip to
physical media, instead of just letting the OS do its own buffering.
Now we still PHYSFS_Io::flush() on PHYSFS_close(), like this has always
worked. That might also be overkill, but that remains a historical artifact
of trying to keep the underlying file handle usable if pending writes fail
for possibly-recoverable reasons (which isn't guaranteed if you just close()
it, at least as far as I remember).
(transplanted from 8b3cc36531c6ac09dbac98d3774921bdf14b240d)
2018-11-27 23:53:33 -05:00
Ryan C. Gordon
9ef9a06db3
windows: Workaround GetUserProfileDirectory's API change in Win10 build 1809.
2018-10-03 22:40:57 -04:00
Ryan C. Gordon
4a56820f1d
PHYSFS_setWriteDir() shouldn't create an empty file if the dir doesn't exist.
...
(transplanted from 2653b3bc19c9ba7d1e6bf53566719e4e30935382)
2018-05-16 19:54:51 -04:00
Ryan C. Gordon
b1c6c7f4a8
Fix up physfs.h for compilers that are sensitive about preprocessor defines.
2018-04-19 10:06:38 -04:00
Ryan C. Gordon
a828a91feb
apple: Patched to compile with older (mac 10.7) SDKs (thanks, Ken and Ryan!).
...
(transplanted from 46561a3098955aa3534c10e2dcd9e969e140bb3d)
2018-03-24 00:19:59 -04:00
Ryan C. Gordon
e216897cb9
7zip: don't forget to destroy the PHYSFS_Io when closing the archive!
...
(transplanted from bc6cd61b76288298feb2d997b99f19deb75fd90c)
2018-03-08 11:47:42 -05:00
Ryan C. Gordon
9ea364e46e
Bumped version to 3.0.1!
2017-10-26 14:38:03 -04:00
Ryan C. Gordon
179bd1d40a
Catch access to paths that are just "." or ".." without any path separator.
...
(transplanted from b6d25a1927c2274cf31166a74b87b24e2752e0e8)
2017-10-26 14:37:16 -04:00
Ryan C. Gordon
a80261989e
Fixed mounting a symlink to a real directory.
...
(transplanted from f3459eaad51bbbed4fc2768c0ec65b3005a7f490)
2017-10-26 14:21:36 -04:00
Ryan C. Gordon
b8aa7dab87
Fixed some infinite loops that a maliciously-crafted .iso can trigger.
...
These bugs exposed by American Fuzzy Lop (AFL), a powerful fuzzer.
http://lcamtuf.coredump.cx/afl/
(transplanted from 4f1bf89597e5b76c1c317fbeb2b472481090b4e4)
2017-10-23 14:58:54 -04:00
Ryan C. Gordon
b9fd9e8100
Don't allow NULL filenames to be mounted.
...
Regardless of what the 3.0.0 documentation says, PhysicsFS never handled this
correctly, so now we check for it so you can't get into crashy situations.
Corrected documentation to reflect reality.
(transplanted from 0bbfaf6c5508139ba3d417377c94d75ca921772a)
2017-10-23 12:40:59 -04:00
Ryan C. Gordon
e290b8d0a0
Fixed crash when duplicating PHYSFS_Io for zipfiles.
...
(transplanted from 67ca4c4f043ecf050c395e767845733512c83de2)
2017-10-23 12:16:51 -04:00
Ryan C. Gordon
9e756312d5
Bumped version to 3.0.0!
2017-09-27 11:54:25 -04:00
Ryan C. Gordon
bb2c38cdea
Added SLB to list of supported archives.
2017-09-27 12:33:36 -04:00
Ryan C. Gordon
9b42fe23fd
Fixed doxygen comment.
2017-09-27 12:07:55 -04:00
Ryan C. Gordon
3d8817346d
Fixed seeking within read buffers.
2017-09-25 16:32:52 -04:00
Ryan C. Gordon
425131ccda
Simplified doBufferedRead().
...
No longer recurses, and deals with EOF correctly.
2017-09-25 16:19:59 -04:00
Ryan C. Gordon
2b78f64c11
Fixed PHYSFS_flush().
2017-09-25 16:19:30 -04:00
Ryan C. Gordon
395b2b02dd
OS/2: Patched to compile.
2017-09-15 19:52:24 -04:00
Ryan C. Gordon
69d3df3286
OS/2: Deal with UTF-8 -> codepage conversion on older OS/2 installs.
...
(untested attempt.)
2017-09-15 19:49:40 -04:00
Ryan C. Gordon
7a26b83733
OS/2: don't report failures on Unicode conversion on older OS/2 installs.
2017-09-14 23:36:51 -04:00
Francesco Bertolaccini
e728c65912
vdf: Don't add directories; UNPK_addEntry()/DirTree will fill in parents.
2017-09-03 13:13:51 -04:00
Ryan C. Gordon
21b2fd39f2
Made PHYSFS_caseFold() a public API.
2017-08-20 02:02:08 -04:00
Ryan C. Gordon
bc2ddf0a53
Added some warnings to the docs about converting bad Unicode strings.
2017-08-20 02:01:50 -04:00
Ryan C. Gordon
9f8ecb91cb
unicode: Added UTF-16 and UCS-4 stricmp functions.
2017-08-20 01:18:41 -04:00
Ryan C. Gordon
eb75883226
OS/2: Fixed NULL pointer dereference.
2017-08-20 01:18:05 -04:00
Ryan C. Gordon
689333dc8f
Clarified some documentation.
2017-08-20 00:35:25 -04:00
Ryan C. Gordon
6ad71878fe
Updated PHYSFS_Archiver with PHYSFS_EnumerateCallbackResult change.
2017-08-19 11:19:28 -04:00
Ryan C. Gordon
4e0d3d55e9
Make PHYSFS_EnumerateCallback return an enum instead of an int.
2017-08-19 10:40:27 -04:00
Ryan C. Gordon
5fb9119ebc
windows: Disable _CRT_SECURE_NO_WARNINGS again.
2017-08-16 21:19:16 -04:00
Ryan C. Gordon
7607eeeb00
Cleaned up some header inclusion politics.
2017-08-16 20:03:24 -04:00
Ryan C. Gordon
e19422cc06
qnx: Added more proper support for QNX.
2017-08-16 20:02:54 -04:00
Ryan C. Gordon
cd0ccf64ed
Bump version to 2.1.1, since we've been at 2.1.0 for 8.5 years. :)
...
There isn't going to be an official 2.1.1 (or 2.1.0) release; we'll let this
marinate a little and jump to 3.0!
2017-08-15 02:08:24 -04:00
Ryan C. Gordon
b311ee44ad
Fixed one more Visual Studio compiler warning.
2017-08-14 21:22:30 -04:00
Ryan C. Gordon
735fd14ea4
Whoops, patched to compile.
2017-08-14 21:17:22 -04:00
Ryan C. Gordon
8dfd3cff8d
Fixed some compiler warnings on Visual Studio.
...
(and maybe made a few new ones...)
2017-08-14 21:15:58 -04:00
Ryan C. Gordon
692d5e8219
Fixed some warnings that Xcode brought up.
2017-08-14 19:58:56 -04:00
Ryan C. Gordon
0d1a73fce4
zip: add some zip_resolve() calls, deal with DirTree-inserted parent dirs.
2017-08-14 16:24:19 -04:00
Ryan C. Gordon
395ea71990
This appears to have been fixed at some point.
2017-08-14 14:06:43 -04:00
Ryan C. Gordon
660171f79f
Don't fail enumeration if a directory isn't available in a given archive.
...
That shouldn't be a fatal error, that's a normal case.
2017-08-14 14:05:06 -04:00
Ryan C. Gordon
f425f051db
Little tweaks to __PHYSFS_initSmallAlloc().
2017-08-14 13:57:57 -04:00
Ryan C. Gordon
8db27a1236
Fix symlink filtering for enumeration under a virtual mount point.
2017-08-14 11:43:18 -04:00
Ryan C. Gordon
cfe3f0180b
Make PHYSFS_exists() work with mounts from PHYSFS_mountIo(io, NULL, ...)
...
(Actually, from any mount function that accepts a bogus/NULL filename.)
2017-08-14 03:06:42 -04:00
Ryan C. Gordon
3b7ee3974c
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.
2017-08-14 02:46:07 -04:00
Ryan C. Gordon
63277e500c
Turns out we were doing this for a (maybe not good, but reasonable) reason.
2017-08-14 02:42:13 -04:00