Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/fileops.c')
-rw-r--r--source/blender/blenlib/intern/fileops.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 39475d73ee0..5df46752e3b 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -635,21 +635,15 @@ int BLI_access(const char *filename, int mode)
*/
int BLI_delete(const char *file, bool dir, bool recursive)
{
- if (strchr(file, '"')) {
- printf("Error: not deleted file %s because of quote!\n", file);
+ if (recursive) {
+ return recursive_operation(file, NULL, NULL, delete_single_file, delete_callback_post);
+ }
+ else if (dir) {
+ return rmdir(file);
}
else {
- if (recursive) {
- return recursive_operation(file, NULL, NULL, delete_single_file, delete_callback_post);
- }
- else if (dir) {
- return rmdir(file);
- }
- else {
- return remove(file); //BLI_snprintf(str, sizeof(str), "/bin/rm -f \"%s\"", file);
- }
+ return remove(file);
}
- return -1;
}
/**