From c8fa513bc46b95fe36378b2f31492df66fa4ea66 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 19 Dec 2015 14:08:30 +0000 Subject: [PATCH] Rename path_to_url to file_path_to_url. Just to make clear that it isn't appropriate for directories, for which it would need to add a trailing slash. I don't want to add such a check. --- src/actions.cpp | 2 +- src/native_text.cpp | 2 +- src/native_text.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/actions.cpp b/src/actions.cpp index f0f4e7e..cf866e5 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -1892,7 +1892,7 @@ namespace quickbook path = path_difference(state.xinclude_base, full_path); } - return xinclude_path(full_path, detail::path_to_url(path)); + return xinclude_path(full_path, detail::file_path_to_url(path)); } default: diff --git a/src/native_text.cpp b/src/native_text.cpp index bc4b365..b5d9d0e 100644 --- a/src/native_text.cpp +++ b/src/native_text.cpp @@ -111,7 +111,7 @@ namespace detail { // // Some info on file URLs at: // https://en.wikipedia.org/wiki/File_URI_scheme - std::string path_to_url(fs::path const& x) + std::string file_path_to_url(fs::path const& x) { // TODO: Maybe should throw an exception if this doesn't understand the path. // TODO: Might need a special cygwin implementation. diff --git a/src/native_text.hpp b/src/native_text.hpp index da08bf4..f38f311 100644 --- a/src/native_text.hpp +++ b/src/native_text.hpp @@ -125,7 +125,7 @@ namespace quickbook std::string path_to_generic(fs::path const&); fs::path generic_to_path(boost::string_ref); - std::string path_to_url(fs::path const&); + std::string file_path_to_url(fs::path const&); void initialise_output();