Skip to content
Snippets Groups Projects
Commit 64b374f8 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

fileutils: cleanup

Change-Id: Ie418d1a353d971a8246ce55865345700c10800f6
parent d2ae07d3
No related branches found
No related tags found
No related merge requests found
......@@ -172,12 +172,12 @@ expand_path(const std::string& path)
#endif
}
std::map<std::string, std::mutex> fileLocks {};
std::mutex fileLockLock {};
std::mutex&
getFileLock(const std::string& path)
{
static std::mutex fileLockLock {};
static std::map<std::string, std::mutex> fileLocks {};
std::lock_guard<std::mutex> l(fileLockLock);
return fileLocks[path];
}
......@@ -585,7 +585,7 @@ get_home_dir()
#else
// 1) try getting user's home directory from the environment
const std::string home(PROTECTED_GETENV("HOME"));
std::string home(PROTECTED_GETENV("HOME"));
if (not home.empty())
return home;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment