diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-24 08:33:32 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-24 08:54:01 +0300 |
commit | 4682a0882f02c50b20aa3c4bf9abe9f7ec2e834b (patch) | |
tree | 36dc6fb09eaa1d539e516875ed957aba5334666e /source/blender/windowmanager | |
parent | 5058c4b1446f58bb9a5ddcb65f7353d9df3a594a (diff) |
Cleanup: use "filepath" instead of "filename" for full paths
Reserve "filename" when only the name component is used.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 16 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 10 |
2 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 04ce7bcb520..b6fc47a3df7 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1999,20 +1999,20 @@ void wm_autosave_timer(Main *bmain, wmWindowManager *wm, wmTimer *UNUSED(wt)) void wm_autosave_delete(void) { - char filename[FILE_MAX]; + char filepath[FILE_MAX]; - wm_autosave_location(filename); + wm_autosave_location(filepath); - if (BLI_exists(filename)) { + if (BLI_exists(filepath)) { char str[FILE_MAX]; BLI_join_dirfile(str, sizeof(str), BKE_tempdir_base(), BLENDER_QUIT_FILE); /* if global undo; remove tempsave, otherwise rename */ if (U.uiflag & USER_GLOBALUNDO) { - BLI_delete(filename, false, false); + BLI_delete(filepath, false, false); } else { - BLI_rename(filename, str); + BLI_rename(filepath, str); } } } @@ -2959,10 +2959,10 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op) static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { - char filename[FILE_MAX]; + char filepath[FILE_MAX]; - wm_autosave_location(filename); - RNA_string_set(op->ptr, "filepath", filename); + wm_autosave_location(filepath); + RNA_string_set(op->ptr, "filepath", filepath); wm_open_init_use_scripts(op, true); WM_event_add_fileselect(C, op); diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 6a9776c6933..8d6741dcfb6 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -440,19 +440,19 @@ void WM_exit_ex(bContext *C, const bool do_python) if (undo_memfile != NULL) { /* save the undo state as quit.blend */ Main *bmain = CTX_data_main(C); - char filename[FILE_MAX]; + char filepath[FILE_MAX]; bool has_edited; const int fileflags = G.fileflags & ~G_FILE_COMPRESS; - BLI_join_dirfile(filename, sizeof(filename), BKE_tempdir_base(), BLENDER_QUIT_FILE); + BLI_join_dirfile(filepath, sizeof(filepath), BKE_tempdir_base(), BLENDER_QUIT_FILE); has_edited = ED_editors_flush_edits(bmain); if ((has_edited && BLO_write_file( - bmain, filename, fileflags, &(const struct BlendFileWriteParams){0}, NULL)) || - (BLO_memfile_write_file(undo_memfile, filename))) { - printf("Saved session recovery to '%s'\n", filename); + bmain, filepath, fileflags, &(const struct BlendFileWriteParams){0}, NULL)) || + (BLO_memfile_write_file(undo_memfile, filepath))) { + printf("Saved session recovery to '%s'\n", filepath); } } } |