aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-03-22 14:57:46 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-03-22 15:14:43 +0100
commitc290508a5ebf7e26c68fc0bb01382f708e645402 (patch)
treeeccce3982fbcb825bbaff535551045bf1c2c6f7f /src/util.h
parenta6926b065d654a448937f9f1e2999ac48d50a984 (diff)
parent8674e74b47c1f6e86a367cfbc738fcc9812b616b (diff)
downloadbitcoin-c290508a5ebf7e26c68fc0bb01382f708e645402.tar.xz
Merge #12630: Provide useful error message if datadir is not writable.
8674e74 Provide relevant error message if datadir is not writable. (murrayn) Pull request description: If the --datadir exists, but is not writable, the current error message on startup is 'Cannot obtain a lock on data directory foo. Bitcoin Core is probably already running.' This is misleading. I believe this PR addresses #11668, although the issue is not Windows-specific. Tree-SHA512: 10cbbaea433072aee4fb3e8938a72073c7a5c841f7a7685c9e12549c322b2925c7d34bac254ac33021b23132bfc352c058712bc9542298cf86f8fd9757f528b2
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index aebd2fd590..04ff44f218 100644
--- a/src/util.h
+++ b/src/util.h
@@ -174,6 +174,7 @@ int RaiseFileDescriptorLimit(int nMinFD);
void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length);
bool RenameOver(fs::path src, fs::path dest);
bool LockDirectory(const fs::path& directory, const std::string lockfile_name, bool probe_only=false);
+bool DirIsWritable(const fs::path& directory);
/** Release all directory locks. This is used for unit testing only, at runtime
* the global destructor will take care of the locks.