[banshee/1.5.1-fixes: 52/56] [MassStorageSource] Escape playlist name when syncing (bgo#606532)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/1.5.1-fixes: 52/56] [MassStorageSource] Escape playlist name when syncing (bgo#606532)
- Date: Mon, 22 Mar 2010 18:08:26 +0000 (UTC)
commit 7bbcc2adaad961923b3c16f98686fec788cde247
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Tue Jan 19 18:37:13 2010 +1100
[MassStorageSource] Escape playlist name when syncing (bgo#606532)
.../Banshee.Dap.MassStorage/MassStorageSource.cs | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
index b00b145..16bc9b7 100644
--- a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
+++ b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
@@ -311,14 +311,15 @@ namespace Banshee.Dap.MassStorage
List<Source> children = new List<Source> (Children);
foreach (Source child in children) {
PlaylistSource from = child as PlaylistSource;
- if (from != null) {
+ string escaped_name = StringUtil.EscapeFilename (child.Name);
+ if (from != null && !String.IsNullOrEmpty (escaped_name)) {
from.Reload ();
if (playlist_format == null) {
playlist_format = Activator.CreateInstance (PlaylistTypes[0].Type) as PlaylistFormatBase;
}
SafeUri playlist_path = new SafeUri (System.IO.Path.Combine (
- PlaylistsPath, String.Format ("{0}.{1}", from.Name, PlaylistTypes[0].FileExtension)));
+ PlaylistsPath, String.Format ("{0}.{1}", escaped_name, PlaylistTypes[0].FileExtension)));
System.IO.Stream stream = Banshee.IO.File.OpenWrite (playlist_path, true);
playlist_format.BaseUri = new Uri (BaseDirectory);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]