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:
authorCampbell Barton <ideasman42@gmail.com>2021-12-13 08:22:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-13 08:22:19 +0300
commit8ad2642c4717dcfad31626f7eebac325a9827b73 (patch)
tree2d2ba09f1cd3849adb45eb51a590783a5a9eca02 /source/blender/blenloader/intern/writefile.c
parent27231afce5e4d0832113415f4d3cdeed480b165f (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/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index f8f5dab8797..45258a50961 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1028,7 +1028,7 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
/* prevent mem checkers from complaining */
memset(fg._pad, 0, sizeof(fg._pad));
- memset(fg.filename, 0, sizeof(fg.filename));
+ memset(fg.filepath, 0, sizeof(fg.filepath));
memset(fg.build_hash, 0, sizeof(fg.build_hash));
fg._pad1 = NULL;
@@ -1045,7 +1045,7 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
fg.globalf = G.f;
/* Write information needed for recovery. */
if (fileflags & G_FILE_RECOVER_WRITE) {
- BLI_strncpy(fg.filename, mainvar->name, sizeof(fg.filename));
+ STRNCPY(fg.filepath, mainvar->filepath);
}
sprintf(subvstr, "%4d", BLENDER_FILE_SUBVERSION);
memcpy(fg.subvstr, subvstr, 4);
@@ -1362,12 +1362,12 @@ bool BLO_write_file(Main *mainvar,
char dir_src[FILE_MAX];
char dir_dst[FILE_MAX];
- BLI_split_dir_part(mainvar->name, dir_src, sizeof(dir_src));
+ BLI_split_dir_part(mainvar->filepath, dir_src, sizeof(dir_src));
BLI_split_dir_part(filepath, dir_dst, sizeof(dir_dst));
/* Just in case there is some subtle difference. */
- BLI_path_normalize(mainvar->name, dir_dst);
- BLI_path_normalize(mainvar->name, dir_src);
+ BLI_path_normalize(mainvar->filepath, dir_dst);
+ BLI_path_normalize(mainvar->filepath, dir_src);
/* Only for relative, not relative-all, as this means making existing paths relative. */
if (remap_mode == BLO_WRITE_PATH_REMAP_RELATIVE) {