File locking deprecation replacements (#593)
This commit is contained in:
committed by
GitHub
parent
d1f06cb774
commit
58a529cc44
@@ -21,9 +21,7 @@ static bool parseEntry(const cJSON* object, AppHubEntry& entry) {
|
||||
}
|
||||
|
||||
bool parseJson(const std::string& filePath, std::vector<AppHubEntry>& entries) {
|
||||
auto lockable = file::getLock(filePath);
|
||||
auto lock = lockable->asScopedLock();
|
||||
lock.lock();
|
||||
file::FileMutexGuard guard(filePath);
|
||||
|
||||
auto data = file::readString(filePath);
|
||||
if (data == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user