summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Move.cpp14
-rw-r--r--src/server/events/Move.hpp1
2 files changed, 5 insertions, 10 deletions
diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp
index 5044ce3e..4d72e9ba 100644
--- a/src/server/events/Move.cpp
+++ b/src/server/events/Move.cpp
@@ -40,8 +40,6 @@ Move::Move(Engine& engine,
: Event(engine, client, id, timestamp)
, _old_path(path)
, _new_path(new_path)
- , _parent_patch(NULL)
- , _port(NULL)
{
}
@@ -67,7 +65,11 @@ Move::pre_process()
return Event::pre_process_done(EXISTS, _new_path);
}
- _port = dynamic_cast<PortImpl*>(i->second.get());
+ EnginePort* eport = _engine.driver()->port(_old_path);
+ if (eport) {
+ _engine.driver()->rename_port(_old_path, _new_path);
+ }
+
_engine.store()->rename(i, _new_path);
return Event::pre_process_done(SUCCESS);
@@ -76,12 +78,6 @@ Move::pre_process()
void
Move::execute(ProcessContext& context)
{
- if (_port && !_port->parent()->parent()) {
- EnginePort* eport = _engine.driver()->engine_port(context, _new_path);
- if (eport) {
- eport->move(_new_path);
- }
- }
}
void
diff --git a/src/server/events/Move.hpp b/src/server/events/Move.hpp
index 0e46df1b..6c38347f 100644
--- a/src/server/events/Move.hpp
+++ b/src/server/events/Move.hpp
@@ -63,7 +63,6 @@ private:
const Raul::Path _old_path;
const Raul::Path _new_path;
PatchImpl* _parent_patch;
- PortImpl* _port;
};
} // namespace Events