From 2ba09e4b41b01cbd8f8756eb0e3b7e33136e06b3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Feb 2017 22:41:18 +0100 Subject: Move static path stuff to its own header --- src/server/events/Copy.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/server/events/Copy.cpp') diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp index 668a6fca..1f7ca708 100644 --- a/src/server/events/Copy.cpp +++ b/src/server/events/Copy.cpp @@ -51,9 +51,9 @@ Copy::pre_process(PreProcessContext& ctx) { std::lock_guard lock(_engine.store()->mutex()); - if (Node::uri_is_path(_old_uri)) { + if (uri_is_path(_old_uri)) { // Old URI is a path within the engine - const Raul::Path old_path = Node::uri_to_path(_old_uri); + const Raul::Path old_path = uri_to_path(_old_uri); // Find the old node const Store::iterator i = _engine.store()->find(old_path); @@ -66,7 +66,7 @@ Copy::pre_process(PreProcessContext& ctx) return Event::pre_process_done(Status::BAD_OBJECT_TYPE, old_path); } - if (Node::uri_is_path(_new_uri)) { + if (uri_is_path(_new_uri)) { // Copy to path within the engine return engine_to_engine(ctx); } else if (_new_uri.scheme() == "file") { @@ -76,7 +76,7 @@ Copy::pre_process(PreProcessContext& ctx) return Event::pre_process_done(Status::BAD_REQUEST); } } else if (_old_uri.scheme() == "file") { - if (Node::uri_is_path(_new_uri)) { + if (uri_is_path(_new_uri)) { return filesystem_to_engine(ctx); } else { // Ingen is not your file manager @@ -91,7 +91,7 @@ bool Copy::engine_to_engine(PreProcessContext& ctx) { // Only support a single source for now - const Raul::Path new_path = Node::uri_to_path(_new_uri); + const Raul::Path new_path = uri_to_path(_new_uri); if (!Raul::Symbol::is_valid(new_path.symbol())) { return Event::pre_process_done(Status::BAD_REQUEST); } @@ -175,7 +175,7 @@ Copy::filesystem_to_engine(PreProcessContext& ctx) // Old URI is a filesystem path and new URI is a path within the engine const std::string src_path = _old_uri.substr(strlen("file://")); - const Raul::Path dst_path = Node::uri_to_path(_new_uri); + const Raul::Path dst_path = uri_to_path(_new_uri); boost::optional dst_parent; boost::optional dst_symbol; if (!dst_path.is_root()) { -- cgit v1.2.1