Revert "Sanitize the AAF's snapshot name (it'll get used later to create an OS folder)"

This reverts commit b935710b60.

legalize_for_universal_path() already santizes the path in a way that is
safe for all OS.

laaf_util_clean_filename() cannot be used with .c_str() because the
function modifies the char* passed to it.

This worked in some cases before C++11, and can work with non-const
 std::string::data starting at C++17, but C++11 spec is quite clear:

> The program shall not modify any of the values stored in the
> character array; otherwise, the behavior is undefined.
This commit is contained in:
Robin Gareus 2024-02-21 13:38:39 +01:00
parent 7e7d22e7d2
commit ff82e53b85
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 0 additions and 1 deletions

View File

@ -402,7 +402,6 @@ ARDOUR_UI::new_session_from_aaf (string const& aaf, string const& target_dir, st
snapshot = basename_nosuffix (aaf);
}
snapshot = laaf_util_clean_filename((char *)snapshot.c_str());
snapshot = legalize_for_universal_path (snapshot);
path = Glib::build_filename (target_dir, snapshot);