summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfdesktop-file-icon-manager.c16
-rw-r--r--src/xfdesktop-regular-file-icon.c6
-rw-r--r--src/xfdesktop-special-file-icon.c12
-rw-r--r--src/xfdesktop-volume-icon.c6
4 files changed, 16 insertions, 24 deletions
diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c
index ecee0b77..de45689d 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -3171,26 +3171,18 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager
for(l = path_list; l; l = l->next) {
ThunarVfsPath *path = (ThunarVfsPath *)l->data;
- ThunarVfsInfo *dinfo = NULL;
/* only work with file:// URIs here */
if(thunar_vfs_path_get_scheme(path) != THUNAR_VFS_PATH_SCHEME_FILE)
continue;
+ /* root nodes cause crashes */
+ if(thunar_vfs_path_is_root(path))
+ continue;
- if(thunar_vfs_path_is_root(path)) {
- ThunarVfsInfo *dinfo = thunar_vfs_info_new_for_path(path, NULL);
- if(dinfo)
- name = dinfo->display_name;
- else
- continue;
- } else
- name = thunar_vfs_path_get_name(path);
+ name = thunar_vfs_path_get_name(path);
dest_path = thunar_vfs_path_relative(base_dest_path,
name);
dest_path_list = g_list_prepend(dest_path_list, dest_path);
-
- if(dinfo)
- thunar_vfs_info_unref(dinfo);
}
thunar_vfs_path_unref(base_dest_path);
dest_path_list = g_list_reverse(dest_path_list);
diff --git a/src/xfdesktop-regular-file-icon.c b/src/xfdesktop-regular-file-icon.c
index d45196a8..fc925212 100644
--- a/src/xfdesktop-regular-file-icon.c
+++ b/src/xfdesktop-regular-file-icon.c
@@ -397,9 +397,9 @@ xfdesktop_regular_file_icon_do_drop_dest(XfdesktopIcon *icon,
ThunarVfsPath *dest_path;
if(thunar_vfs_path_is_root(src_info->path))
- name = src_info->display_name;
- else
- name = thunar_vfs_path_get_name(src_info->path);
+ return FALSE;
+
+ name = thunar_vfs_path_get_name(src_info->path);
g_return_val_if_fail(name, FALSE);
dest_path = thunar_vfs_path_relative(regular_file_icon->priv->info->path,
diff --git a/src/xfdesktop-special-file-icon.c b/src/xfdesktop-special-file-icon.c
index a54a8da4..28b9edd1 100644
--- a/src/xfdesktop-special-file-icon.c
+++ b/src/xfdesktop-special-file-icon.c
@@ -268,9 +268,9 @@ xfdesktop_special_file_icon_get_allowed_drag_actions(XfdesktopIcon *icon)
switch(special_file_icon->priv->type) {
case XFDESKTOP_SPECIAL_FILE_ICON_FILESYSTEM:
- /* root dir should always be readable, but move is just impossible,
- * and copy seems a bit retarded. */
- actions = GDK_ACTION_LINK;
+ /* move is just impossible, and copy seems a bit retarded. link
+ * is possible, but thunar-vfs doesn't support it (deliberately). */
+ actions = 0;
break;
case XFDESKTOP_SPECIAL_FILE_ICON_HOME:
@@ -395,9 +395,9 @@ xfdesktop_special_file_icon_do_drop_dest(XfdesktopIcon *icon,
return FALSE;
if(thunar_vfs_path_is_root(src_info->path))
- name = src_info->display_name;
- else
- name = thunar_vfs_path_get_name(src_info->path);
+ return FALSE;
+
+ name = thunar_vfs_path_get_name(src_info->path);
g_return_val_if_fail(name, FALSE);
dest_path = thunar_vfs_path_relative(special_file_icon->priv->info->path,
diff --git a/src/xfdesktop-volume-icon.c b/src/xfdesktop-volume-icon.c
index a38a6ef6..5d75765a 100644
--- a/src/xfdesktop-volume-icon.c
+++ b/src/xfdesktop-volume-icon.c
@@ -337,9 +337,9 @@ xfdesktop_volume_icon_do_drop_dest(XfdesktopIcon *icon,
return FALSE;
if(thunar_vfs_path_is_root(src_info->path))
- name = src_info->display_name;
- else
- name = thunar_vfs_path_get_name(src_info->path);
+ return FALSE;
+
+ name = thunar_vfs_path_get_name(src_info->path);
g_return_val_if_fail(name, FALSE);
dest_path = thunar_vfs_path_relative(volume_icon->priv->info->path,