cairo-dock-team team mailing list archive
-
cairo-dock-team team
-
Mailing list archive
-
Message #02627
[Bug 686564] [NEW] Trash not emptied with folders from other partitions
Public bug reported:
When a folder from a partition other than the home partition is put into
the trash, the trash can't be emptied with middle-clicking on the
dustbin applet. I get an error like this:
------------------
vfs.c:cairo_dock_gio_vfs_empty_trash:1624) [0m
gnome_integration : Error removing file: Directory not empty
GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Error removing file: No such file or directory
------------------
The GError part can be fixed by using "g_file_delete (file, NULL, NULL)"
in that section of the function "cairo_dock_gio_vfs_empty_trash", which
is related to the deletion of info files.
To fix "Error removing file: Directory not empty", in the same function,
I added "G_FILE_ATTRIBUTE_STANDARD_TYPE" to "cAttributes" and set the
following condition in a proper place:
if (iFileType == G_FILE_TYPE_DIRECTORY)
{
cairo_dock_gio_vfs_empty_dir (sFileUri->str);
}
I've attached a patch.
** Affects: cairo-dock-plug-ins
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Cairo-
Dock Team, which is subscribed to Cairo-Dock Plug-ins.
https://bugs.launchpad.net/bugs/686564
Title:
Trash not emptied with folders from other partitions
Status in Cairo-Dock : Plug-ins:
New
Bug description:
When a folder from a partition other than the home partition is put into the trash, the trash can't be emptied with middle-clicking on the dustbin applet. I get an error like this:
------------------
vfs.c:cairo_dock_gio_vfs_empty_trash:1624) [0m
gnome_integration : Error removing file: Directory not empty
GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Error removing file: No such file or directory
------------------
The GError part can be fixed by using "g_file_delete (file, NULL, NULL)" in that section of the function "cairo_dock_gio_vfs_empty_trash", which is related to the deletion of info files.
To fix "Error removing file: Directory not empty", in the same function, I added "G_FILE_ATTRIBUTE_STANDARD_TYPE" to "cAttributes" and set the following condition in a proper place:
if (iFileType == G_FILE_TYPE_DIRECTORY)
{
cairo_dock_gio_vfs_empty_dir (sFileUri->str);
}
I've attached a patch.
Follow ups
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Matthieu Baerts, 2012-07-10
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Launchpad Bug Tracker, 2012-04-17
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Launchpad Bug Tracker, 2012-04-16
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Tsu Jan, 2011-01-28
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Tsu Jan, 2011-01-26
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Tsu Jan, 2011-01-26
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Tsu Jan, 2011-01-26
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Tsu Jan, 2011-01-26
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Fabounet, 2011-01-25
-
[Bug 686564] Re: Trash not emptied with folders from other partitions
From: Tsu Jan, 2010-12-07
-
[Bug 686564] [NEW] Trash not emptied with folders from other partitions
From: Tsu Jan, 2010-12-07
References