banshee r4488 - in trunk/banshee: . src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue
- From: blorentz svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4488 - in trunk/banshee: . src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue
- Date: Mon, 8 Sep 2008 11:55:46 +0000 (UTC)
Author: blorentz
Date: Mon Sep 8 11:55:46 2008
New Revision: 4488
URL: http://svn.gnome.org/viewvc/banshee?rev=4488&view=rev
Log:
2008-09-08 Bertrand Lorentz <bertrand lorentz gmail com>
* src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs:
Handle relative paths as parameters on the command line (BGO #537600).
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs
Modified: trunk/banshee/src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs Mon Sep 8 11:55:46 2008
@@ -27,6 +27,7 @@
//
using System;
+using System.IO;
using Mono.Unix;
using Gtk;
@@ -94,7 +95,14 @@
play_enqueued = ApplicationContext.CommandLine.Contains ("play-enqueued");
foreach (string path in ApplicationContext.CommandLine.Files) {
- Enqueue (path);
+ // If it looks like a URI with a protocol, leave it as is
+ if (System.Text.RegularExpressions.Regex.IsMatch (path, "^\\w+\\:\\/")) {
+ Log.DebugFormat ("URI file : {0}", path);
+ Enqueue (path);
+ } else {
+ Log.DebugFormat ("Relative file : {0} -> {1}", path, Path.GetFullPath (path));
+ Enqueue (Path.GetFullPath (path));
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]