Fix the URI handling (for sfdb) for Windows
This forward ports Mixbus' 4eca3dea47 without additional code to correct for old (Ardour2) URIs. A2, used path2uri() which accumulated and left duplicate slashes in place, eg. "file:////". Mixbus3 auto-corrected this on load in AudioLibrary::search_members_and(). However sfdb libraries are not shared between major versions, so this code does no need to be forward ported.
This commit is contained in:
parent
6cfb164d7c
commit
c218b65d24
@ -78,8 +78,13 @@ void
|
||||
AudioLibrary::save_changes ()
|
||||
{
|
||||
#ifdef HAVE_LRDF
|
||||
if (lrdf_export_by_source(src.c_str(), src.substr(5).c_str())) {
|
||||
PBD::warning << string_compose(_("Could not open %1. Audio Library not saved"), src) << endmsg;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
string path = Glib::locale_from_utf8 (Glib::filename_from_uri(src));
|
||||
#else
|
||||
string path = Glib::filename_from_uri(src);
|
||||
#endif
|
||||
if (lrdf_export_by_source(src.c_str(), path.c_str())) {
|
||||
PBD::warning << string_compose(_("Could not open %1. Audio Library not saved"), path) << endmsg;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user