Return volume names correctly.

This commit is contained in:
David Given
2022-08-31 20:56:38 +02:00
parent f5640b970b
commit 34f034c6c4
2 changed files with 2 additions and 2 deletions

View File

@@ -164,7 +164,7 @@ std::string tohex(const std::string& s)
if ((b >= 32) && (b <= 126)) if ((b >= 32) && (b <= 126))
ss << (char)b; ss << (char)b;
else else
ss << fmt::format("%{:2x}", b); ss << fmt::format("%{:02x}", b);
} }
return ss.str(); return ss.str();

View File

@@ -92,7 +92,7 @@ public:
Directory dir(this); Directory dir(this);
std::map<std::string, std::string> attributes; std::map<std::string, std::string> attributes;
attributes[VOLUME_NAME] = ""; attributes[VOLUME_NAME] = dir.volumeName;
attributes[TOTAL_BLOCKS] = fmt::format("{}", getLogicalSectorCount()); attributes[TOTAL_BLOCKS] = fmt::format("{}", getLogicalSectorCount());
attributes[USED_BLOCKS] = fmt::format("{}", dir.usedSectors); attributes[USED_BLOCKS] = fmt::format("{}", dir.usedSectors);
attributes[BLOCK_SIZE] = "256"; attributes[BLOCK_SIZE] = "256";