diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-05-28 20:50:40 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-05-28 21:21:39 +0400 |
commit | 973f95fa9dfb21e4347a510f119c55b9673f6076 (patch) | |
tree | 9c08ca5e2803b3b816f4e443938a80ea9319df20 /source/blender/blenkernel | |
parent | 74cc3974fea0422343b09bdd61e4d3924c62940a (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/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/bpath.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/packedFile.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index d0883728a71..3fca58bd088 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -210,7 +210,7 @@ static int findFileRecursive(char *filename_new, /* file searching stuff */ DIR *dir; struct dirent *de; - struct stat status; + BLI_stat_t status; char path[FILE_MAX]; int size; bool found = false; diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index dafe5ca55ff..d186b4299a5 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -368,7 +368,7 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i int checkPackedFile(const char *filename, PackedFile *pf) { - struct stat st; + BLI_stat_t st; int ret_val, i, len, file; char buf[4096]; char name[FILE_MAX]; 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]; |