Skip to content

Commit

Permalink
Make .walletlock distinct from .lock
Browse files Browse the repository at this point in the history
meshcollider authored and furszy committed Jul 21, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent d8539bb commit 6a0380a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wallet/db.cpp
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ void CheckUniqueFileid(const CDBEnv& env, const std::string& filename, Db& db)
bool LockEnvDirectory(const fs::path& env_path)
{
// Make sure only a single PIVX process is using the wallet directory.
fs::path lock_file_path = env_path / ".lock";
fs::path lock_file_path = env_path / ".walletlock";
FILE* file = fsbridge::fopen(lock_file_path, "a"); // empty lock file; created if it doesn't exist.
if (file) fclose(file);

@@ -126,7 +126,7 @@ bool CDBEnv::Open(const fs::path& pathIn, bool retry)

strPath = pathIn.string();
if (!LockEnvDirectory(pathIn)) {
LogPrintf("Cannot obtain a lock on wallet directory %s. Another instance of PIVX may be using it.", strPath);
LogPrintf("Cannot obtain a lock on wallet directory %s. Another instance of PIVX may be using it.\n", strPath);
return false;
}

0 comments on commit 6a0380a

Please sign in to comment.