From 973f95fa9dfb21e4347a510f119c55b9673f6076 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 28 May 2014 22:50:40 +0600 Subject: 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. --- source/blender/blenkernel/intern/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/text.c') diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index b6d7e8922c4..90687ef9916 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -667,7 +667,7 @@ void BKE_text_write(Text *text, const char *str) /* called directly from rna */ int BKE_text_file_modified_check(Text *text) { - struct stat st; + BLI_stat_t st; int result; char file[FILE_MAX]; @@ -696,7 +696,7 @@ int BKE_text_file_modified_check(Text *text) void BKE_text_file_modified_ignore(Text *text) { - struct stat st; + BLI_stat_t st; int result; char file[FILE_MAX]; -- cgit v1.2.3