mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
BASE: Improve format of command line md5 command result
This commit is contained in:
parent
571e11d724
commit
db049e37be
@ -1388,8 +1388,9 @@ static void calcMD5(Common::FSNode &path, int32 length) {
|
||||
}
|
||||
|
||||
Common::String md5 = Common::computeStreamMD5AsString(*stream, length);
|
||||
printf("(hash) : %s, (filename) : %s, (bytes) : %d%s\n", md5.c_str(), path.getName().c_str(), length && length <= stream->size() ? (int32)length : (int32)stream->size(), tail ? ", tail" : "");
|
||||
|
||||
if (length != 0 && length < stream->size())
|
||||
md5 += Common::String::format(" (%s %d bytes)", tail ? "last" : "first", length);
|
||||
printf("%s: %s, %llu bytes\n", path.getName().c_str(), md5.c_str(), (unsigned long long)stream->size());
|
||||
delete stream;
|
||||
} else {
|
||||
printf("Usage : --md5 --md5-path=<PATH> [--md5-length=NUM]\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user