bug: do not block hashing file read on posix (#4356)

This commit is contained in:
Nick Anderson 2018-05-03 10:38:06 -07:00 committed by GitHub
parent d10dbb3caa
commit 81751e5526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,6 +97,7 @@ MultiHashes hashMultiFromFile(int mask, const std::string& path) {
{HASH_TYPE_SHA256, std::make_shared<Hash>(HASH_TYPE_SHA256)},
};
auto blocking = isPlatform(PlatformType::TYPE_WINDOWS);
auto s = readFile(path,
0,
kHashChunkSize,
@ -109,7 +110,7 @@ MultiHashes hashMultiFromFile(int mask, const std::string& path) {
}
}
}),
true);
blocking);
MultiHashes mh = {};
if (!s.ok()) {