summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-29 15:36:38 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-29 15:36:38 +0300
commit7b93bda2932da0cd14da0e08e2b5a34ce03d99cb (patch)
tree2f7b1aaa0fc0688bcd2fdc5ba91a535becba4086
parente37bf9dd8764adaf1b83a98b2abfd140efbb3379 (diff)
downloadmv-7b93bda2932da0cd14da0e08e2b5a34ce03d99cb.tar.gz
mv-7b93bda2932da0cd14da0e08e2b5a34ce03d99cb.tar.bz2
mv-7b93bda2932da0cd14da0e08e2b5a34ce03d99cb.tar.xz
mv-7b93bda2932da0cd14da0e08e2b5a34ce03d99cb.zip
Add workaround fix for broken macports libs.
Probably broken physfs.
-rw-r--r--src/utils/physfsrwops.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils/physfsrwops.cpp b/src/utils/physfsrwops.cpp
index e755ea353..67376d3dc 100644
--- a/src/utils/physfsrwops.cpp
+++ b/src/utils/physfsrwops.cpp
@@ -179,6 +179,10 @@ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname)
{
if (!fname || !*fname)
return nullptr;
+#ifdef __APPLE__
+ if (!PHYSFS_exists(fname))
+ return nullptr;
+#endif
return create_rwops(PHYSFS_openRead(fname));
} /* PHYSFSRWOPS_openRead */
@@ -186,6 +190,10 @@ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname)
{
if (!fname || !*fname)
return nullptr;
+#ifdef __APPLE__
+ if (!PHYSFS_exists(fname))
+ return nullptr;
+#endif
return create_rwops(PHYSFS_openWrite(fname));
} /* PHYSFSRWOPS_openWrite */
@@ -193,6 +201,10 @@ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname)
{
if (!fname || !*fname)
return nullptr;
+#ifdef __APPLE__
+ if (!PHYSFS_exists(fname))
+ return nullptr;
+#endif
return create_rwops(PHYSFS_openAppend(fname));
} /* PHYSFSRWOPS_openAppend */