diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-13 08:22:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-13 08:22:19 +0300 |
commit | 8ad2642c4717dcfad31626f7eebac325a9827b73 (patch) | |
tree | 2d2ba09f1cd3849adb45eb51a590783a5a9eca02 /source/creator/creator_signals.c | |
parent | 27231afce5e4d0832113415f4d3cdeed480b165f (diff) |
Cleanup: use "filepath" term for Main, BlendFileData & FileGlobal
Use "filepath" which is the current convention for naming full paths.
- Main use "name" which isn't obviously a file path.
- BlendFileData & FileGlobal used "filename" which is often
used for the name component of a path (without the directory).
Diffstat (limited to 'source/creator/creator_signals.c')
-rw-r--r-- | source/creator/creator_signals.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c index b74264fdddd..c23664d746f 100644 --- a/source/creator/creator_signals.c +++ b/source/creator/creator_signals.c @@ -117,11 +117,11 @@ static void sig_handle_crash(int signum) if (memfile) { char fname[FILE_MAX]; - if (!(G_MAIN && G_MAIN->name[0])) { + if (!(G_MAIN && G_MAIN->filepath[0])) { BLI_join_dirfile(fname, sizeof(fname), BKE_tempdir_base(), "crash.blend"); } else { - BLI_strncpy(fname, G_MAIN->name, sizeof(fname)); + STRNCPY(fname, G_MAIN->filepath); BLI_path_extension_replace(fname, sizeof(fname), ".crash.blend"); } @@ -138,11 +138,12 @@ static void sig_handle_crash(int signum) char fname[FILE_MAX]; - if (!(G_MAIN && G_MAIN->name[0])) { + if (!(G_MAIN && G_MAIN->filepath[0])) { BLI_join_dirfile(fname, sizeof(fname), BKE_tempdir_base(), "blender.crash.txt"); } else { - BLI_join_dirfile(fname, sizeof(fname), BKE_tempdir_base(), BLI_path_basename(G_MAIN->name)); + BLI_join_dirfile( + fname, sizeof(fname), BKE_tempdir_base(), BLI_path_basename(G_MAIN->filepath)); BLI_path_extension_replace(fname, sizeof(fname), ".crash.txt"); } |