diff options
| author | MeshCollider <[email protected]> | 2017-12-06 00:24:06 +1300 |
|---|---|---|
| committer | MeshCollider <[email protected]> | 2017-12-06 00:24:06 +1300 |
| commit | 529b8667599ad74f6dae639b889d22e907353070 (patch) | |
| tree | f7817d8773754e12385a979bff752cfe6ee66598 /src/util.cpp | |
| parent | Merge #11556: [Qt] Improved copy for RBF checkbox and tooltip (diff) | |
| download | discoin-529b8667599ad74f6dae639b889d22e907353070.tar.xz discoin-529b8667599ad74f6dae639b889d22e907353070.zip | |
Test datadir in conf file exists
Diffstat (limited to 'src/util.cpp')
| -rw-r--r-- | src/util.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 6631c236f..1aa18c73b 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -639,6 +639,9 @@ void ArgsManager::ReadConfigFile(const std::string& confPath) } // If datadir is changed in .conf file: ClearDatadirCache(); + if (!fs::is_directory(GetDataDir(false))) { + throw std::runtime_error(strprintf("specified data directory \"%s\" does not exist.", gArgs.GetArg("-datadir", "").c_str())); + } } #ifndef WIN32 |