[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34060] trunk/blender/source/blender/ makesrna/intern/makesrna.c: print a message if the file cant be removed, may help narrow down why there are problems with MSVC at the moment.
Campbell Barton
ideasman42 at gmail.com
Tue Jan 4 11:28:38 CET 2011
Revision: 34060
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34060
Author: campbellbarton
Date: 2011-01-04 11:28:37 +0100 (Tue, 04 Jan 2011)
Log Message:
-----------
print a message if the file cant be removed, may help narrow down why there are problems with MSVC at the moment.
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 08:56:25 UTC (rev 34059)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-01-04 10:28:37 UTC (rev 34060)
@@ -68,7 +68,16 @@
// return 0; // use for testing had edited rna
#define REN_IF_DIFF \
- remove(orgfile); \
+ { \
+ FILE *file_test= fopen(orgfile, "rb"); \
+ if(file_test) { \
+ fclose(file_test); \
+ if(remove(orgfile) != 0) { \
+ fprintf(stderr, "%s:%d, Remove Error (%s): \"%s\"\n", __FILE__, __LINE__, strerror(errno), orgfile); \
+ return -1; \
+ } \
+ } \
+ } \
if(rename(tmpfile, orgfile) != 0) { \
fprintf(stderr, "%s:%d, Rename Error (%s): \"%s\" -> \"%s\"\n", __FILE__, __LINE__, strerror(errno), tmpfile, orgfile); \
return -1; \
More information about the Bf-blender-cvs
mailing list