Created
January 10, 2018 02:16
-
-
Save cigumo/840575d91c7479c1dd18f28c569de05e to your computer and use it in GitHub Desktop.
physfs doMkdir patch to allow creating dirs when symlinks are part of the path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modified love/src/jni/physfs-2.1.0/src/physfs.c | |
@@ -2014,7 +2014,8 @@ static int doMkdir(const char *_dname, char *dname) | |
const int rc = h->funcs->stat(h->opaque, dname, &statbuf); | |
if ((!rc) && (currentErrorCode() == PHYSFS_ERR_NOT_FOUND)) | |
exists = 0; | |
- retval = ((rc) && (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY)); | |
+ retval = ((rc) && (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY || | |
+ (allowSymLinks && statbuf.filetype == PHYSFS_FILETYPE_SYMLINK))); | |
} /* if */ | |
if (!exists) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment