Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-05-28 20:50:40 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-05-28 21:21:39 +0400
commit973f95fa9dfb21e4347a510f119c55b9673f6076 (patch)
tree9c08ca5e2803b3b816f4e443938a80ea9319df20 /source/blender/blenlib/BLI_fileops.h
parent74cc3974fea0422343b09bdd61e4d3924c62940a (diff)
Fix T40157: Loading movies larger than 4GB in size fails
Issue was caused by _wstat returning EOVERFLOW error because of file size didn't fit into stat structure which was using long datatype. The idea of this patch is to use _wstat64 and _stat64 structure which is capable storing 64bit file sizes. Made it a typedef for stat structure used by BLI_stat function in order to make code easier to follow and avoid ifdefs all over the place. Additionally solved issue with BLI_exists which was wrongly returning False in cases destination file is larger then 4GB.
Diffstat (limited to 'source/blender/blenlib/BLI_fileops.h')
-rw-r--r--source/blender/blenlib/BLI_fileops.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 7c10e50acc4..c032b606900 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -59,7 +59,18 @@ int BLI_rename(const char *from, const char *to);
int BLI_delete(const char *path, bool dir, bool recursive);
int BLI_move(const char *path, const char *to);
int BLI_create_symlink(const char *path, const char *to);
-int BLI_stat(const char *path, struct stat *buffer);
+
+#ifdef WIN32
+# ifndef __MINGW64__
+typedef struct _stat64 BLI_stat_t;
+# else
+typedef struct stat BLI_stat_t;
+#endif
+#else
+typedef struct stat BLI_stat_t;
+#endif
+
+int BLI_stat(const char *path, BLI_stat_t *buffer);
/* Directories */