From 93c5525a369b5a05e74cc76031c8c0db0f8d878b Mon Sep 17 00:00:00 2001 From: James Crook Date: Fri, 21 Aug 2020 15:05:37 +0100 Subject: [PATCH] Bug 1441 - Mac: Imported file names containing '/' change the '/' to ':' This addresses only one part of the behaviour, and now disallows \ and / in export multiple on all platforms. --- src/Internat.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Internat.cpp b/src/Internat.cpp index b92054507..a6411ac50 100644 --- a/src/Internat.cpp +++ b/src/Internat.cpp @@ -39,6 +39,7 @@ and on Mac OS X for the filesystem. // Otherwise, you get link errors. wxChar Internat::mDecimalSeparator = wxT('.'); // default +// exclude is used by SanitiseFilename. wxArrayString Internat::exclude; // DA: Use tweaked translation mechanism to replace 'Audacity' by 'DarkAudacity'. @@ -106,7 +107,10 @@ void Internat::Init() exclude.push_back(wxString{ cc }); // The path separators may not be forbidden, so add them - auto separators = wxFileName::GetPathSeparators(format); + //auto separators = wxFileName::GetPathSeparators(format); + + // Bug 1441 exclude all separators from filenames on all platforms. + auto separators = wxString("\\/"); for(auto cc: separators) { if (forbid.Find(cc) == wxNOT_FOUND)