Better exception in OnDiskBlockStore when rootdir is not a directory
This commit is contained in:
parent
7402af10c4
commit
ea9d912a16
@ -17,6 +17,9 @@ OnDiskBlockStore::OnDiskBlockStore(const boost::filesystem::path &rootdir)
|
|||||||
if (!bf::exists(rootdir)) {
|
if (!bf::exists(rootdir)) {
|
||||||
throw std::runtime_error("Base directory not found");
|
throw std::runtime_error("Base directory not found");
|
||||||
}
|
}
|
||||||
|
if (!bf::is_directory(rootdir)) {
|
||||||
|
throw std::runtime_error("Base directory is not a directory");
|
||||||
|
}
|
||||||
//TODO Test for read access, write access, enter (x) access, and throw runtime_error in case
|
//TODO Test for read access, write access, enter (x) access, and throw runtime_error in case
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user