MixerSnapshotManager::create_snapshot needs to correctly set the path when it creates the snapshot

This commit is contained in:
Nikolaus Gullotta 2019-07-31 15:53:11 -05:00 committed by Nikolaus Gullotta
parent 90b2249f97
commit 42fc3a2703
No known key found for this signature in database
GPG key ID: 565F60578092AA31

View file

@ -211,6 +211,9 @@ void MixerSnapshotManager::create_snapshot(std::string const& label, RouteList&
snapshot->set_label(label);
snapshot->write(path);
const string full_path = Glib::build_filename(path, snapshot->get_label() + string(template_suffix));
snapshot->set_path(full_path);
MixerSnapshot* old_snapshot = get_snapshot_by_name(snapshot->get_label(), global);
set<MixerSnapshot*>& snapshots_list = global ? _global_snapshots : _local_snapshots;
set<MixerSnapshot*>::iterator iter = snapshots_list.find(old_snapshot);
@ -231,6 +234,9 @@ void MixerSnapshotManager::create_snapshot(std::string const& label, std::string
snapshot->set_label(label);
snapshot->write(path);
const string full_path = Glib::build_filename(path, snapshot->get_label() + string(template_suffix));
snapshot->set_path(full_path);
MixerSnapshot* old_snapshot = get_snapshot_by_name(snapshot->get_label(), global);
set<MixerSnapshot*>& snapshots_list = global ? _global_snapshots : _local_snapshots;
set<MixerSnapshot*>::iterator iter = snapshots_list.find(old_snapshot);