From 7efdea5e1729ad3e8c2b9d5772758a45d9712c07 Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Mon, 14 May 2012 03:13:23 +0000 Subject: [PATCH] allow "config" as top-level XML node when reading Boost serialization config. git-svn-id: http://encfs.googlecode.com/svn/trunk@82 db9cf616-1c43-0410-9cb8-a902689de0d6 --- encfs/FileUtils.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/encfs/FileUtils.cpp b/encfs/FileUtils.cpp index 9972731..75caa11 100644 --- a/encfs/FileUtils.cpp +++ b/encfs/FileUtils.cpp @@ -285,6 +285,14 @@ bool readV6Config( const char *configFile, XmlValuePtr serialization = rdr["boost_serialization"]; XmlValuePtr config = (*serialization)["cfg"]; + if (!config) { + config = (*serialization)["config"]; + } + if (!config) { + rError("Unable to find XML configuration in file %s", configFile); + return false; + } + int version = 0; (*config)["@version"] >> version;