diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-05 03:26:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-05 03:26:55 +0400 |
commit | a824220d3e71afda0460c769324c9029243d0560 (patch) | |
tree | 6b9fc10147a117db415d6dbb47d1a9203616f78a /source/blender/blenloader | |
parent | 66a72343ef7bda52a30c0e96b17e792016d924b3 (diff) |
better errors for failier to read blends
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index cefc6edb5a3..f1cbf60209c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -959,11 +959,11 @@ static FileData *blo_decode_and_check(FileData *fd, ReportList *reports) FileData *blo_openblenderfile(char *name, ReportList *reports) { gzFile gzfile; - + errno= 0; gzfile= gzopen(name, "rb"); if (gzfile == Z_NULL) { - BKE_report(reports, RPT_ERROR, "Unable to open"); + BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", name, errno ? strerror(errno) : "Unknown erro reading file"); return NULL; } else { FileData *fd = filedata_new(); @@ -996,7 +996,7 @@ FileData *blo_openblendermemory(void *mem, int memsize, ReportList *reports) FileData *blo_openblendermemfile(MemFile *memfile, ReportList *reports) { if (!memfile) { - BKE_report(reports, RPT_ERROR, "Unable to open"); + BKE_report(reports, RPT_ERROR, "Unable to open blend <memory>"); return NULL; } else { FileData *fd= filedata_new(); |