mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-24 18:25:50 +00:00
Do not put "Link to ..." in front of symbolic links that are created in
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. svn path=/trunk/; revision=14982
This commit is contained in:
parent
07eb59633a
commit
51e71c6a6b
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
||||
2009-02-20 Christian Neumair <cneumair@gnome.org>
|
||||
|
||||
* src/file-manager/fm-directory-view.c
|
||||
|
|
|
@ -336,9 +336,9 @@ get_link_name (const char *name, int count, int max_length)
|
|||
|
||||
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 @@ get_link_name (const char *name, int count, int max_length)
|
|||
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 @@ link_file (CopyMoveJob *job,
|
|||
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 @@ link_file (CopyMoveJob *job,
|
|||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue