nautilus r14982 - in trunk: . libnautilus-private
- From: cneumair svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14982 - in trunk: . libnautilus-private
- Date: Fri, 20 Feb 2009 14:40:20 +0000 (UTC)
Author: cneumair
Date: Fri Feb 20 14:40:20 2009
New Revision: 14982
URL: http://svn.gnome.org/viewvc/nautilus?rev=14982&view=rev
Log:
2009-02-20 Christian Neumair <cneumair gnome org>
* libnautilus-private/nautilus-file-operations.c (get_link_name),
(link_file):
Do not put "Link to ..." in front of symbolic links that are created
in another directory via DND. Fixes #534432.
Modified:
trunk/ChangeLog
trunk/libnautilus-private/nautilus-file-operations.c
Modified: trunk/libnautilus-private/nautilus-file-operations.c
==============================================================================
--- trunk/libnautilus-private/nautilus-file-operations.c (original)
+++ trunk/libnautilus-private/nautilus-file-operations.c Fri Feb 20 14:40:20 2009
@@ -336,9 +336,9 @@
g_assert (name != NULL);
- if (count < 1) {
+ if (count < 0) {
g_warning ("bad count in get_link_name");
- count = 1;
+ count = 0;
}
if (count <= 2) {
@@ -349,6 +349,10 @@
default:
g_assert_not_reached ();
/* fall through */
+ case 0:
+ /* duplicate original file name */
+ format = _("%s");
+ break;
case 1:
/* appended to new link file */
format = _("Link to %s");
@@ -4888,7 +4892,7 @@
GdkPoint *position,
int files_left)
{
- GFile *dest, *new_dest;
+ GFile *src_dir, *dest, *new_dest;
int count;
char *path;
gboolean not_local;
@@ -4900,7 +4904,14 @@
common = (CommonJob *)job;
- count = 1;
+ count = 0;
+
+ src_dir = g_file_get_parent (src);
+ if (src_dir == dest_dir) {
+ count = 1;
+ }
+ g_object_unref (src_dir);
+
handled_invalid_filename = *dest_fs_type != NULL;
dest = get_target_file_for_link (src, dest_dir, *dest_fs_type, count);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]