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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user