System don't ask to empty Trash when unmounting NTFS partitions

Bug #140968 reported by Patrice Vetsel
12
Affects Status Importance Assigned to Milestone
GnomeVFS
Expired
Medium
gnome-vfs2 (Ubuntu)
Invalid
Low
Ubuntu Desktop Bugs

Bug Description

When you try to unmount an usb key formated with vfat, you have a dialog box asking you what you want to do with the trash there is on it (see attachment).

With the same usb key, same partition, but formated with NTFS (this is the only difference), when you want to unmount it, there is no dialog. Conclusion, user do not know that there is an hidden trash directory (.Trash-~user) on his usb key. Time after time, this directory take more space and user don't know why there is no more space left on is usb key.

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

/home/kagou/Desktop/Capture-empty_trash.png

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

I confirm this bug.

Changed in gnome-vfs2:
status: New → Confirmed
Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

According to the the fs_data structure in libgnomevfs/gnome-vfs-filesystem-type.c, trash should not be used on NTFS filesystems.
This is why no "Empty trash" dialog box is showed, gnomevfs thinks there can't exist a trash on such system.

So the bug is rather that a Trash is created on the volume which is supposed to not support it.
I don't know yet where the error lies.

However, I suppose that the "No trash on NTFS" setting was ok when ntfs was only read-only. Now a Trash can be created on such a filesystem.
So a quick workaround on this bug is to enable ntfs trash usage which what the attached patch does.

I put updated gnomevfs2 package including this fix in my personal package archive if someone want to test::
http://ppa.launchpad.net/yann-pleiades/ubuntu/pool/main/g/gnome-vfs2/

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

I found where the "does the filesystem support trash ?" test was missing.

The attached patch adds the missing test in nautilus. Maybe I should open a bug in Nautilus ?

There was already an upstream bug linked to this problem: http://bugzilla.gnome.org/show_bug.cgi?id=157259

I also opened a bug so trash usage is properly enabled on NTFS: http://bugzilla.gnome.org/show_bug.cgi?id=488699

Nautilus packages including this fixe available for test at: http://ppa.launchpad.net/yann-pleiades/ubuntu/pool/main/n/nautilus/

Revision history for this message
unggnu (unggnu) wrote :

I think that this is a duplicate of Bug #106621. The problem is the combination of Fuse and Gnome VFs2 afaik.

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

Yes it seems to be a duplicate but Fuse is not the problem I think.
Could you try to use the package from my personal archive to test if it solves your problem ?

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

New version of the patch where we consider that trash usage is enabled when no corresponding volume is found (that's the case of the local filesystem).

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

Argh, a misplaced unref in the previous patch.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your work on the issue

Changed in gnome-vfs2:
assignee: nobody → desktop-bugs
importance: Undecided → Low
Changed in gnome-vfs:
status: Unknown → New
Revision history for this message
ynamestnikov (ynamestnikov) wrote :

Thank you very much, Yann!=)
I tested your patch on Ubuntu 7.10, and it fix also problem with ntfs disk trash can Bug #106621.
But I've a question: when your patch will be added to official repositories?

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

@Yuri: the patches have already been reported upstream ( http://bugzilla.gnome.org/show_bug.cgi?id=488699 and http://bugzilla.gnome.org/show_bug.cgi?id=157259 ), I will send them on the gnome-vfs mailing-list to ask for review.

Ubuntu maintainers could also use the patches even if upstream doesn't for now but that's up to them (Sebastien Bacher ?).
gnome-vfs is supposed to be replaced by gvfs at some time but I don't know what is the current state.

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :
Changed in gnome-vfs2:
status: Confirmed → Triaged
Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

@pedro: what is the status of gvfs for Hardy ? Theses patchs will never be accepted as upstream moved to gvfs.

Revision history for this message
Ezra Reeves (ezrareeves) wrote :

Closing this as per upstream "gnome 2.22 will not use gnome-vfs anymore and has a completely rewritten
implementation of this (gio/gvfs)."

Changed in gnome-vfs2 (Ubuntu):
status: Triaged → Invalid
tags: added: patch-rejected-upstream
Ezra Reeves (ezrareeves)
Changed in gnome-vfs:
status: New → Unknown
Changed in gnome-vfs:
importance: Unknown → Medium
status: Unknown → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.