diff --git a/src/db/plugins/simple/DirectorySave.cxx b/src/db/plugins/simple/DirectorySave.cxx index 5db129992..1eed26d01 100644 --- a/src/db/plugins/simple/DirectorySave.cxx +++ b/src/db/plugins/simple/DirectorySave.cxx @@ -121,10 +121,11 @@ ParseLine(Directory &directory, const char *line) } static Directory * -directory_load_subdir(TextFile &file, Directory &parent, const char *name) +directory_load_subdir(TextFile &file, Directory &parent, std::string_view name) { if (parent.FindChild(name) != nullptr) - throw FormatRuntimeError("Duplicate subdirectory '%s'", name); + throw FormatRuntimeError("Duplicate subdirectory '%.*s'", + int(name.size()), name.data()); Directory *directory = parent.CreateChild(name);