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.
This commit is contained in:
2011-10-22 15:35:49 +00:00
parent c1de5cc838
commit e417e011d5
39 changed files with 137 additions and 191 deletions

View File

@@ -2753,7 +2753,7 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *r
scene_unique_exr_name(scene, str, 0);
if (BLI_is_writable(str)==0) {
if (BLI_file_is_writable(str)==0) {
BKE_report(reports, RPT_ERROR, "Can not save render buffers, check the temp default path");
return 0;
}
@@ -3152,7 +3152,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
}
if(scene->r.mode & R_TOUCH && !BLI_exists(name)) {
BLI_make_existing_file(name); /* makes the dir if its not there */
BLI_touch(name);
BLI_file_touch(name);
}
}
@@ -3175,7 +3175,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
if(G.afbreek==1) {
/* remove touched file */
if(BKE_imtype_is_movie(scene->r.imtype) == 0) {
if (scene->r.mode & R_TOUCH && BLI_exists(name) && BLI_filepathsize(name) == 0) {
if (scene->r.mode & R_TOUCH && BLI_exists(name) && BLI_file_size(name) == 0) {
BLI_delete(name, 0, 0);
}
}