banshee r4244 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Base	src/Core/Banshee.Services/Banshee.Collection.Database
- From: blorentz svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4244 - in trunk/banshee: . src/Core/Banshee.Core/Banshee.Base	src/Core/Banshee.Services/Banshee.Collection.Database
- Date: Thu, 24 Jul 2008 17:33:04 +0000 (UTC)
Author: blorentz
Date: Thu Jul 24 17:33:04 2008
New Revision: 4244
URL: http://svn.gnome.org/viewvc/banshee?rev=4244&view=rev
Log:
2008-07-24  Bertrand Lorentz  <bertrand lorentz gmail com>
	* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:
	* src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs: Replace string 
	concatenations with Path.Combine calls, and get rid of useless Substring
	call (BGO #544427).
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
Modified: trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Core/Banshee.Base/FileNamePattern.cs	Thu Jul 24 17:33:04 2008
@@ -245,11 +245,9 @@
             }
             
             string songpath = CreateFromTrackInfo (track) + ext;
-            string dir = Path.GetFullPath (Paths.LibraryLocation + 
-                Path.DirectorySeparatorChar + 
-                Path.GetDirectoryName (songpath));
-            string filename = dir + Path.DirectorySeparatorChar + 
-                Path.GetFileName (songpath);
+            string dir = Path.GetFullPath (Path.Combine (Paths.LibraryLocation, 
+                Path.GetDirectoryName (songpath)));
+            string filename = Path.Combine (dir, Path.GetFileName (songpath));
                 
             if (!Banshee.IO.Directory.Exists (dir)) {
                 Banshee.IO.Directory.Create (dir);
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs	Thu Jul 24 17:33:04 2008
@@ -514,7 +514,7 @@
             bool in_library = old_uri.AbsolutePath.StartsWith (Paths.CachedLibraryLocation);
 
             if (!in_library && (LibrarySchema.CopyOnImport.Get () || force_copy)) {
-                string new_filename = FileNamePattern.BuildFull (this, Path.GetExtension (old_uri.ToString ()).Substring (1));
+                string new_filename = FileNamePattern.BuildFull (this, Path.GetExtension (old_uri.ToString ()));
                 SafeUri new_uri = new SafeUri (new_filename);
 
                 try {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]