[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34061] trunk/blender/source/blender/ makesrna/intern/makesrna.c: fix for makesrna error on windows where files cant be removed when open.
Campbell Barton
ideasman42 at gmail.com
Tue Jan 4 11:37:22 CET 2011
Revision: 34061
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34061
Author: campbellbarton
Date: 2011-01-04 11:37:22 +0100 (Tue, 04 Jan 2011)
Log Message:
-----------
fix for makesrna error on windows where files cant be removed when open.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/makesrna.c
Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-01-04 10:28:37 UTC (rev 34060)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-01-04 10:37:22 UTC (rev 34061)
@@ -72,6 +72,8 @@
FILE *file_test= fopen(orgfile, "rb"); \
if(file_test) { \
fclose(file_test); \
+ if(fp_org) fclose(fp_org); \
+ if(fp_new) fclose(fp_new); \
if(remove(orgfile) != 0) { \
fprintf(stderr, "%s:%d, Remove Error (%s): \"%s\"\n", __FILE__, __LINE__, strerror(errno), orgfile); \
return -1; \
@@ -87,7 +89,7 @@
/* end REN_IF_DIFF */
- FILE *fp_new, *fp_org;
+ FILE *fp_new= NULL, *fp_org= NULL;
int len_new, len_org;
char *arr_new, *arr_org;
int cmp;
More information about the Bf-blender-cvs
mailing list