From 36d640c8bc1f26ec8c8367ddbedbbb5b06dfbb65 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 29 Dec 2022 19:02:15 +0100 Subject: [PATCH] Yet another attempt to fix Windows/LADSPA presets --- libs/ardour/ladspa_plugin.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index 91d8cacfeb..51c8088055 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -875,14 +875,15 @@ LadspaPlugin::write_preset_file () } #endif - string const source = preset_source (); + string const source = preset_source (); + string const filename = Glib::filename_from_uri (source); - if (g_mkdir_with_parents (Glib::path_get_dirname (source).c_str(), 0775)) { + if (g_mkdir_with_parents (Glib::path_get_dirname (filename).c_str(), 0775)) { warning << string_compose(_("Could not create %1. Preset not saved. (%2)"), source, strerror(errno)) << endmsg; return false; } - if (lrdf_export_by_source (source.c_str(), Glib::filename_from_uri (source).c_str())) { + if (lrdf_export_by_source (source.c_str(), filename.c_str())) { warning << string_compose(_("Error saving presets file %1."), source) << endmsg; return false; }