1 |
pacho 11/06/27 11:41:15 |
2 |
|
3 |
Added: gvfs-1.6.7-fix-renaming.patch |
4 |
Log: |
5 |
Apply patch fixing renaming issues with afc backend, allow to build without udev on prefix (bug #293480 by Rabbe Fogelholm). |
6 |
|
7 |
(Portage version: 2.1.9.50/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 gnome-base/gvfs/files/gvfs-1.6.7-fix-renaming.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gvfs/files/gvfs-1.6.7-fix-renaming.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gvfs/files/gvfs-1.6.7-fix-renaming.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: gvfs-1.6.7-fix-renaming.patch |
16 |
=================================================================== |
17 |
From 6282ea2d0aebf0692aca8de22f8733d1ec109711 Mon Sep 17 00:00:00 2001 |
18 |
From: Bastien Nocera <hadess@××××××.net> |
19 |
Date: Thu, 24 Mar 2011 11:46:32 +0000 |
20 |
Subject: afc: Fix renaming files moving them to the root dir |
21 |
|
22 |
We were moving and renaming files, instead of just renaming them, |
23 |
as the display_name wasn't properly rooted to the existing directory. |
24 |
|
25 |
https://bugzilla.gnome.org/show_bug.cgi?id=638191 |
26 |
--- |
27 |
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c |
28 |
index ae266c4..0379847 100644 |
29 |
--- a/daemon/gvfsbackendafc.c |
30 |
+++ b/daemon/gvfsbackendafc.c |
31 |
@@ -1386,19 +1386,28 @@ g_vfs_backend_afc_set_display_name (GVfsBackend *backend, |
32 |
const char *display_name) |
33 |
{ |
34 |
GVfsBackendAfc *self; |
35 |
+ char *new_path; |
36 |
+ char *dirname; |
37 |
|
38 |
self = G_VFS_BACKEND_AFC(backend); |
39 |
g_return_if_fail (self->connected); |
40 |
|
41 |
+ dirname = g_path_get_dirname (filename); |
42 |
+ new_path = g_build_filename (dirname, display_name, NULL); |
43 |
+ g_free (dirname); |
44 |
+ |
45 |
if (G_UNLIKELY(g_vfs_backend_afc_check (afc_rename_path (self->afc_cli, |
46 |
- filename, display_name), |
47 |
+ filename, new_path), |
48 |
G_VFS_JOB(job)))) |
49 |
{ |
50 |
+ g_free (new_path); |
51 |
return; |
52 |
} |
53 |
|
54 |
g_vfs_job_set_display_name_set_new_path (job, display_name); |
55 |
|
56 |
+ g_free (new_path); |
57 |
+ |
58 |
g_vfs_job_succeeded (G_VFS_JOB(job)); |
59 |
} |
60 |
|
61 |
-- |
62 |
cgit v0.9 |