diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-04-11 16:29:29 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-04-11 16:29:29 +0400 |
commit | a02937d86ccb30f0cc08ef451634595fb45726c6 (patch) | |
tree | 888b31961f3bb2fbdae144bbc35e89779a775cdb /source/blender/blenlib | |
parent | 716f40018286fbeeb02a736b4f5f39dffca0b1e9 (diff) |
Fix for bug #8920: particles reactor crash and memory leak.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/fileops.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index a9da0c9c738..268f9280bea 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -331,11 +331,15 @@ int BLI_delete(char *file, int dir, int recursive) printf("Error: not deleted file %s because of quote!\n", file); } else { - if (recursive) sprintf(str, "/bin/rm -rf \"%s\"", file); - else if (dir) sprintf(str, "/bin/rmdir \"%s\"", file); + if (recursive) { + sprintf(str, "/bin/rm -rf \"%s\"", file); + return system(str); + } + else if (dir) { + sprintf(str, "/bin/rmdir \"%s\"", file); + return system(str); + } else remove(file); //sprintf(str, "/bin/rm -f \"%s\"", file); - - return system(str); } return -1; } |