[nautilus] file-operations: use the local (FUSE) path for remote symlinks



commit 41d2230d6fd57fa73de0adb75123c077fe5cb995
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 13 21:54:28 2012 -0400

    file-operations: use the local (FUSE) path for remote symlinks
    
    Instead of the path relative to the remote machine, in case the
    destination of the link is native.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=148330

 libnautilus-private/nautilus-file-operations.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 4adf054..811ff86 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -5252,12 +5252,12 @@ report_link_progress (CopyMoveJob *link_job, int total, int left)
 }
 
 static char *
-get_abs_path_for_symlink (GFile *file)
+get_abs_path_for_symlink (GFile *file, GFile *destination)
 {
 	GFile *root, *parent;
 	char *relative, *abs;
 	
-	if (g_file_is_native (file)) {
+	if (g_file_is_native (file) || g_file_is_native (destination)) {
 		return g_file_get_path (file);
 	}
 
@@ -5311,7 +5311,7 @@ link_file (CopyMoveJob *job,
 	error = NULL;
 	not_local = FALSE;
 	
-	path = get_abs_path_for_symlink (src);
+	path = get_abs_path_for_symlink (src, dest);
 	if (path == NULL) {
 		not_local = TRUE;
 	} else if (g_file_make_symbolic_link (dest,



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