sqlite: complete symlinks so that the proper relative path can be fetched for an attached db reference - closes #859
This commit is contained in:
parent
1dc3d279c1
commit
aa9bdf0d5a
1 changed files with 7 additions and 0 deletions
|
@ -174,6 +174,13 @@ void sqlite_datasource::parse_attachdb(std::string const& attachdb) {
|
|||
// It is a relative path. Fix it.
|
||||
if (!child_path.has_root_directory() && !child_path.has_root_name()) {
|
||||
boost::filesystem::path absolute_path(dataset_name_);
|
||||
|
||||
// support symlinks
|
||||
if (boost::filesystem::is_symlink(absolute_path))
|
||||
{
|
||||
absolute_path = boost::filesystem::read_symlink(absolute_path);
|
||||
}
|
||||
|
||||
#if (BOOST_FILESYSTEM_VERSION == 3)
|
||||
filename = boost::filesystem::absolute(absolute_path.parent_path()/filename).string();
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue