Fix #34551: blender crash rendering with save buffers.

Problem was the new usage of access() on Windows, this doesn't accept X_OK. Also wrapped _waccess so that UTF-8 paths work.
This commit is contained in:
Brecht Van Lommel
2013-03-13 19:48:07 +00:00
parent 962865d19f
commit dcbfa25bc8
5 changed files with 36 additions and 3 deletions

View File

@@ -75,6 +75,20 @@ int uopen(const char *filename, int oflag, int pmode)
return f;
}
int uaccess(const char *filename, int mode)
{
int r = -1;
UTF16_ENCODE(filename);
if (filename_16) {
r = _waccess(filename_16, mode);
}
UTF16_UN_ENCODE(filename);
return r;
}
int urename(const char *oldname, const char *newname )
{
int r = -1;

View File

@@ -32,6 +32,7 @@
FILE * ufopen(const char * filename, const char * mode);
int uopen(const char *filename, int oflag, int pmode);
int uaccess(const char *filename, int mode);
int urename(const char *oldname, const char *newname );
char * u_alloc_getenv(const char *varname);