Fixed a bug in filename propagation -- ensure we don't include an

extraneous slash.
This commit is contained in:
casey langen 2020-06-14 22:16:33 -07:00
parent fde389a34a
commit 5ab0883735
2 changed files with 6 additions and 1 deletions

View File

@ -138,8 +138,9 @@ namespace musik { namespace core { namespace sdk { namespace fs {
if (!findData.cFileName) {
continue;
}
bool hasTrailingSlash = path[path.size() - 1] == '\\';
std::string relPath8 = str::u16to8(findData.cFileName);
std::string fullPath8 = path + "\\" + relPath8;
std::string fullPath8 = path + (hasTrailingSlash ? "" : "\\") + relPath8;
if (interrupt && interrupt()) {
return;
}

View File

@ -187,6 +187,10 @@ void OpenMptIndexerSource::UpdateMetadata(
}
std::string artist = readMetadataValue(module, "artist");
if (!artist.size()) {
artist = "[unknown mod artist]";
}
const std::string duration = std::to_string(openmpt_module_get_duration_seconds(module));
auto track = indexer->CreateWriter();