From e417e011d558693b9ff9cd048efe9cbe79da74be Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 22 Oct 2011 15:35:49 +0000 Subject: Code cleanup: file operations merged into single header, some function names made less cryptic and changed to indicate if they work on files or directories. --- source/blender/editors/space_file/file_draw.c | 1 - source/blender/editors/space_file/file_ops.c | 5 ++--- source/blender/editors/space_file/filelist.c | 5 ++--- source/blender/editors/space_file/filesel.c | 1 - source/blender/editors/space_file/space_file.c | 1 - 5 files changed, 4 insertions(+), 9 deletions(-) (limited to 'source/blender/editors/space_file') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 6fbfa11d0cf..8a7e4ce3ec1 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -37,7 +37,6 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" #include "BLI_dynstr.h" -#include "BLI_storage_types.h" #ifdef WIN32 #include "BLI_winstuff.h" #endif diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 7a379b93ee6..079b1c96d24 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -39,7 +39,6 @@ #include "BLI_blenlib.h" #include "BLI_utildefines.h" -#include "BLI_storage_types.h" #ifdef WIN32 #include "BLI_winstuff.h" #endif @@ -1042,7 +1041,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op) } /* create the file */ - BLI_recurdir_fileops(path); + BLI_dir_create_recursive(path); if (!BLI_exists(path)) { BKE_report(op->reports,RPT_ERROR, "Couldn't create new folder"); @@ -1136,7 +1135,7 @@ int file_directory_exec(bContext *C, wmOperator *UNUSED(unused)) file_expand_directory(C); if (!BLI_exists(sfile->params->dir)) { - BLI_recurdir_fileops(sfile->params->dir); + BLI_dir_create_recursive(sfile->params->dir); } /* special case, user may have pasted a fulepath into the directory */ diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index b478976d027..89a34c62200 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -48,7 +48,6 @@ #include "BLI_blenlib.h" #include "BLI_linklist.h" -#include "BLI_storage_types.h" #include "BLI_threads.h" #include "BLI_utildefines.h" @@ -825,10 +824,10 @@ static void filelist_read_dir(struct FileList* filelist) filelist->fidx = NULL; filelist->filelist = NULL; - BLI_getwdN(wdir, sizeof(wdir)); /* backup cwd to restore after */ + BLI_current_working_dir(wdir, sizeof(wdir)); /* backup cwd to restore after */ BLI_cleanup_dir(G.main->name, filelist->dir); - filelist->numfiles = BLI_getdir(filelist->dir, &(filelist->filelist)); + filelist->numfiles = BLI_dir_contents(filelist->dir, &(filelist->filelist)); if(!chdir(wdir)) {} /* fix warning about not checking return value */ filelist_setfiletypes(filelist); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 790e2f573ee..29d8242e26d 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -64,7 +64,6 @@ #include "BLI_blenlib.h" #include "BLI_linklist.h" -#include "BLI_storage_types.h" #include "BLI_dynstr.h" #include "BLI_utildefines.h" diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 7a70ed9c0a0..726a2a80be1 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -46,7 +46,6 @@ #include "BLI_blenlib.h" #include "BLI_math.h" #include "BLI_rand.h" -#include "BLI_storage_types.h" #include "BLI_utildefines.h" #include "BKE_context.h" -- cgit v1.2.3