Cleanup: avoid redundant copy to access the filename

This commit is contained in:
Campbell Barton
2024-09-15 23:14:13 +10:00
parent a42611be92
commit 8b2ab34ec6

View File

@@ -503,9 +503,7 @@ bool BKE_volume_load(const Volume *volume, const Main *bmain)
/* Test if file exists. */
if (!BLI_exists(filepath)) {
char filename[FILE_MAX];
BLI_path_split_file_part(filepath, filename, sizeof(filename));
grids.error_msg = filename + std::string(" not found");
grids.error_msg = BLI_path_basename(filepath) + std::string(" not found");
CLOG_INFO(&LOG, 1, "Volume %s: %s", volume_name, grids.error_msg.c_str());
return false;
}