[banshee] Banshee.Services: Replace DOS folder separators with UNIX
- From: AndrÃs Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Banshee.Services: Replace DOS folder separators with UNIX
- Date: Thu, 15 Sep 2011 17:05:44 +0000 (UTC)
commit 7d494f6180f89f196855888ec7605d26acfc404b
Author: William Witt <william witt-family net>
Date: Thu Sep 15 18:02:08 2011 +0100
Banshee.Services: Replace DOS folder separators with UNIX
URIs should contain UNIX separators to be able to be resolved,
so if DOS ones are present, replace them.
This way we can reproduce playlists generated by Windows
apps such as Windows Media Player. Fixes bgo#658110.
.../PlaylistFormatBase.cs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Playlists.Formats/PlaylistFormatBase.cs b/src/Core/Banshee.Services/Banshee.Playlists.Formats/PlaylistFormatBase.cs
index 64b3c3d..6ff3e44 100644
--- a/src/Core/Banshee.Services/Banshee.Playlists.Formats/PlaylistFormatBase.cs
+++ b/src/Core/Banshee.Services/Banshee.Playlists.Formats/PlaylistFormatBase.cs
@@ -78,6 +78,9 @@ namespace Banshee.Playlists.Formats
protected virtual Uri ResolveUri(string uri)
{
+ if (!uri.Contains ("/") && uri.Contains ("\\")) {
+ uri = uri.Replace ("\\", "/");
+ }
return BaseUri == null ? new Uri(uri) : new Uri(BaseUri, uri);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]