diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-19 15:32:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-19 15:32:33 +0300 |
commit | 79bb472720610d8b2e925d9d21db77b62c415318 (patch) | |
tree | 2ec6c45a4f20edea405766ba4fee50924bda8a81 /source/blender/makesrna/intern/makesrna.c | |
parent | 7507a5f959211ab8eb52fe098103d63f5b5d67e1 (diff) |
user report renaming file fails, print the errno error message.
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 145f04d644b..e5b1d11ccf9 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -27,6 +27,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <errno.h> #include "MEM_guardedalloc.h" @@ -69,7 +70,7 @@ static int replace_if_different(char *tmpfile, const char *dep_files[]) #define REN_IF_DIFF \ remove(orgfile); \ if(rename(tmpfile, orgfile) != 0) { \ - fprintf(stderr, "%s:%d, rename error: \"%s\" -> \"%s\"\n", __FILE__, __LINE__, tmpfile, orgfile); \ + fprintf(stderr, "%s:%d, Rename Error (%s): \"%s\" -> \"%s\"\n", __FILE__, __LINE__, strerror(errno), tmpfile, orgfile); \ return -1; \ } \ remove(tmpfile); \ |