From 207f8dd16feff1bfc4323c7625c7c49af5379d9e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 11 Feb 2016 01:04:32 +0000 Subject: Pass config file path as a path, not a string --- netfs/fuse/Jamfile.jam | 1 + netfs/fuse/fuseApp.cpp | 2 +- netfs/fuse/fuseApp.h | 3 ++- netfs/unittests/mockFuse.cpp | 2 +- netfs/unittests/mockFuse.h | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/netfs/fuse/Jamfile.jam b/netfs/fuse/Jamfile.jam index 0a168ca..4340687 100644 --- a/netfs/fuse/Jamfile.jam +++ b/netfs/fuse/Jamfile.jam @@ -33,6 +33,7 @@ lib netfsClient : ../lib//netfsCommon ..//boost_thread ..//boost_system + ..//boost_filesystem ..//Ice Glacier2 ..//IceUtil diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp index cd55574..a7d84b5 100644 --- a/netfs/fuse/fuseApp.cpp +++ b/netfs/fuse/fuseApp.cpp @@ -61,7 +61,7 @@ NetFS::FuseApp::~FuseApp() } NetFS::Client::ConfigurationPtr -NetFS::FuseApp::ReadConfiguration(const std::string & path) const +NetFS::FuseApp::ReadConfiguration(const boost::filesystem::path & path) const { return Slicer::DeserializeAny(path); } diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h index a97d271..a210089 100644 --- a/netfs/fuse/fuseApp.h +++ b/netfs/fuse/fuseApp.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -88,7 +89,7 @@ namespace NetFS { protected: typedef boost::function Configurator; Configurator configurator; - virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const std::string &) const; + virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const boost::filesystem::path &) const; virtual NetFS::Client::ResourcePtr configureFromFile(const std::string &, const std::string &) const; virtual NetFS::Client::ResourcePtr configureFromUri(const std::string &) const; diff --git a/netfs/unittests/mockFuse.cpp b/netfs/unittests/mockFuse.cpp index 4b92332..24c2508 100644 --- a/netfs/unittests/mockFuse.cpp +++ b/netfs/unittests/mockFuse.cpp @@ -35,7 +35,7 @@ FuseMock::main(int, char **, const struct fuse_operations * o) } NetFS::Client::ConfigurationPtr -FuseMock::ReadConfiguration(const std::string & path) const +FuseMock::ReadConfiguration(const boost::filesystem::path & path) const { auto c = FuseApp::ReadConfiguration(path); for(auto r : c->Resources) { diff --git a/netfs/unittests/mockFuse.h b/netfs/unittests/mockFuse.h index abace25..4002dab 100644 --- a/netfs/unittests/mockFuse.h +++ b/netfs/unittests/mockFuse.h @@ -16,7 +16,7 @@ class DLL_PUBLIC FuseMock : public NetFS::FuseApp { fuse_operations ops; protected: - virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const std::string &) const override; + virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const boost::filesystem::path &) const override; private: const std::string testEndpoint; -- cgit v1.2.3