diff options
author | Andrea Weikert <elubie@gmx.net> | 2010-07-20 23:26:53 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2010-07-20 23:26:53 +0400 |
commit | d047e5cbcd992667a1b80fedc2fc4588f80f4162 (patch) | |
tree | 589aa63e51589e74180592fb36c9605539962549 | |
parent | a32b1ce8dcc9befba7d969595f60445079e8a94e (diff) |
fix [#22915] Bookmarks and Recent no longer working in r30498
fix [#22920] Clicking folder icons doesn't work in File browser and append
* issue was that on windows stat requires the trailing slash removed, even with mingw.
(since we are after ahoy, putting this into extra #define, code cleanup will follow after release)
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index b7e2aeb84c8..f4679aa4dcf 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -449,6 +449,15 @@ int BLI_exist(char *name) if (len > 3 && ( tmp[len-1]=='\\' || tmp[len-1]=='/') ) tmp[len-1] = '\0'; res = _stat(tmp, &st); if (res == -1) return(0); +#elif defined(WIN32) && defined(__MINGW32__) + struct stat st; + char tmp[FILE_MAXDIR+FILE_MAXFILE]; + int len, res; + BLI_strncpy(tmp, name, FILE_MAXDIR+FILE_MAXFILE); + len = strlen(tmp); + if (len > 3 && ( tmp[len-1]=='\\' || tmp[len-1]=='/') ) tmp[len-1] = '\0'; + res = stat(tmp, &st); + if (res) return(0); #else struct stat st; if (stat(name,&st)) return(0); |