From 1cc05a106cd1efe49d912e59ce133f65b28862ef Mon Sep 17 00:00:00 2001 From: Robert Kausch Date: Tue, 3 Mar 2020 22:20:36 +0100 Subject: [PATCH] Sanitize picture file names before saving them. --- runtime/common/metadata/track.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/common/metadata/track.cpp b/runtime/common/metadata/track.cpp index 7e4c6e559..c70790fb7 100755 --- a/runtime/common/metadata/track.cpp +++ b/runtime/common/metadata/track.cpp @@ -1,5 +1,5 @@ /* BoCA - BonkEnc Component Architecture - * Copyright (C) 2007-2019 Robert Kausch + * Copyright (C) 2007-2020 Robert Kausch * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -349,7 +349,7 @@ Bool BoCA::Track::SaveCoverArtFiles(const String &folder) */ String file = String(folder).Append(folder.EndsWith(Directory::GetDirectoryDelimiter()) ? NIL : Directory::GetDirectoryDelimiter()).Append(fileName); - picture.SaveToFile(Utilities::CreateDirectoryForFile(file)); + picture.SaveToFile(Utilities::CreateDirectoryForFile(Utilities::NormalizeFileName(file))); } return True;