[f-spot] Actually turn it into an extension method.



commit 431f241ab3cb48ae62aac68abcd5b4f249836844
Author: Ruben Vermeersch <ruben savanne be>
Date:   Tue May 18 19:54:29 2010 +0200

    Actually turn it into an extension method.

 extensions/Exporters/FolderExport/FolderExport.cs |    2 +-
 src/Utils/FileExtensions.cs                       |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/extensions/Exporters/FolderExport/FolderExport.cs b/extensions/Exporters/FolderExport/FolderExport.cs
index 561b64a..cf980ea 100644
--- a/extensions/Exporters/FolderExport/FolderExport.cs
+++ b/extensions/Exporters/FolderExport/FolderExport.cs
@@ -250,7 +250,7 @@ namespace FSpotFolderExport {
 				// otherwise we xfer
 				if (!dest.IsNative) {
 					System.Console.WriteLine ("Xfering {0} to {1}", source.ToString (), target.ToString ());
-					result = FileExtensions.CopyRecursive (source, target, GLib.FileCopyFlags.Overwrite, null, Progress);
+					result = source.CopyRecursive (target, GLib.FileCopyFlags.Overwrite, null, Progress);
 				}
 
 				if (result == true) {
diff --git a/src/Utils/FileExtensions.cs b/src/Utils/FileExtensions.cs
index 5b409ca..6daffc7 100644
--- a/src/Utils/FileExtensions.cs
+++ b/src/Utils/FileExtensions.cs
@@ -16,7 +16,7 @@ namespace FSpot.Utils
 {
 	public static class FileExtensions
 	{
-			public static bool CopyRecursive (GLib.File source, GLib.File target, GLib.FileCopyFlags flags, GLib.Cancellable cancellable, GLib.FileProgressCallback callback)
+		public static bool CopyRecursive (this GLib.File source, GLib.File target, GLib.FileCopyFlags flags, GLib.Cancellable cancellable, GLib.FileProgressCallback callback)
 		{
 			bool result = true;
 			try {
@@ -39,7 +39,7 @@ namespace FSpot.Utils
 					GLib.File source_file = GLib.FileFactory.NewForPath (Path.Combine (source.Path, fi.Name));
 					GLib.File target_file = GLib.FileFactory.NewForPath (Path.Combine (target.Path, fi.Name));
 					Log.Debug (String.Format (Catalog.GetString("Copying {0} -> {1}"), source_file.Path, target_file.Path));
-					result = result && CopyRecursive(source_file, target_file, flags, cancellable, callback);
+					result = result && source_file.CopyRecursive(target_file, flags, cancellable, callback);
 					fi = fe.NextFile ();
 				}
 				fe.Close (cancellable);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]