diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-22 19:35:49 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-22 19:35:49 +0400 |
commit | e417e011d558693b9ff9cd048efe9cbe79da74be (patch) | |
tree | 36612e30bf5c561051635c8eef7180d29251e846 /source/blender/imbuf/intern | |
parent | c1de5cc83829b65094eee024af10928bd13261ce (diff) |
Code cleanup: file operations merged into single header, some function names
made less cryptic and changed to indicate if they work on files or directories.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/readimage.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/thumbs.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index e064d7f760d..1084355dd74 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -546,7 +546,7 @@ int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *heig { ExrHandle *data= (ExrHandle *)handle; - if(BLI_exists(filename) && BLI_filepathsize(filename)>32) { /* 32 is arbitrary, but zero length files crashes exr */ + if(BLI_exists(filename) && BLI_file_size(filename)>32) { /* 32 is arbitrary, but zero length files crashes exr */ data->ifile = new InputFile(filename); if(data->ifile) { Box2i dw = data->ifile->header().dataWindow(); diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c index 849b3ff0ce2..1c1e681bb30 100644 --- a/source/blender/imbuf/intern/readimage.c +++ b/source/blender/imbuf/intern/readimage.c @@ -88,7 +88,7 @@ ImBuf *IMB_loadifffile(int file, int flags) if(file == -1) return NULL; - size= BLI_filesize(file); + size= BLI_file_descriptor_size(file); mem= mmap(NULL, size, PROT_READ, MAP_SHARED, file, 0); if(mem==(unsigned char*)-1) { @@ -175,7 +175,7 @@ static void imb_loadtilefile(ImBuf *ibuf, int file, int tx, int ty, unsigned int if(file == -1) return; - size= BLI_filesize(file); + size= BLI_file_descriptor_size(file); mem= mmap(NULL, size, PROT_READ, MAP_SHARED, file, 0); if(mem==(unsigned char*)-1) { diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 2ab7e55d1f8..d2bf7f75615 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -237,10 +237,10 @@ void IMB_thumb_makedirs(void) { char tpath[FILE_MAX]; if (get_thumb_dir(tpath, THB_NORMAL)) { - BLI_recurdir_fileops(tpath); + BLI_dir_create_recursive(tpath); } if (get_thumb_dir(tpath, THB_FAIL)) { - BLI_recurdir_fileops(tpath); + BLI_dir_create_recursive(tpath); } } @@ -277,7 +277,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im /* exception, skip images over 100mb */ if(source == THB_SOURCE_IMAGE) { - const size_t size= BLI_filepathsize(path); + const size_t size= BLI_file_size(path); if(size != -1 && size > THUMB_SIZE_MAX) { // printf("file too big: %d, skipping %s\n", (int)size, path); return NULL; |