[PATCH] enable trash usage on NTFS partitions

View: New views
6 Messages — Rating Filter:   Alert me  

[PATCH] enable trash usage on NTFS partitions

by Yann Rouillard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Trash usage is currently not allowed on NTFS partitions although NTFS
now supports write access.

This simple patch allows trashing on NTFS partitions.

The corresponding bugzilla issues is
http://bugzilla.gnome.org/show_bug.cgi?id=488699

Note that nautilus currently doesn't use the
_gnome_vfs_filesystem_use_trash function which leads to bug like this
http://bugzilla.gnome.org/show_bug.cgi?id=157259 and
https://bugs.launchpad.net/ubuntu/+source/gnome-vfs2/+bug/140968
I will post another patch for this bug.

Yann




diff -Nur gnome-vfs2-2.20.0/libgnomevfs/gnome-vfs-filesystem-type.c gnome-vfs2-2.20.0.new/libgnomevfs/gnome-vfs-filesystem-type.c
--- gnome-vfs2-2.20.0/libgnomevfs/gnome-vfs-filesystem-type.c 2007-10-20 18:23:53.000000000 +0200
+++ gnome-vfs2-2.20.0.new/libgnomevfs/gnome-vfs-filesystem-type.c 2007-10-20 18:24:24.000000000 +0200
@@ -65,7 +65,7 @@
  { "msdosfs"  , N_("MSDOS Volume"), 0 },
  { "nfs"      , N_("NFS Network Volume"), 1 },
  { "nfs4"     , N_("NFS Network Volume"), 1 },
- { "ntfs"     , N_("Windows NT Volume"), 0 },
+ { "ntfs"     , N_("Windows NT Volume"), 1 },
  { "nwfs"     , N_("Netware Volume"), 0 },
  { "proc"     , N_("System Volume"), 0 },
  { "procfs"   , N_("System Volume"), 0 },

_______________________________________________
gnome-vfs-list mailing list
gnome-vfs-list@...
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list

Re: [PATCH] enable trash usage on NTFS partitions

by Alexander Larsson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Tue, 2008-01-15 at 23:26 +0100, Yann Rouillard wrote:

> Hi,
>
> Trash usage is currently not allowed on NTFS partitions although NTFS
> now supports write access.
>
> This simple patch allows trashing on NTFS partitions.
>
> The corresponding bugzilla issues is
> http://bugzilla.gnome.org/show_bug.cgi?id=488699
>
> Note that nautilus currently doesn't use the
> _gnome_vfs_filesystem_use_trash function which leads to bug like this
> http://bugzilla.gnome.org/show_bug.cgi?id=157259 and
> https://bugs.launchpad.net/ubuntu/+source/gnome-vfs2/+bug/140968
> I will post another patch for this bug.

Its kinda weird to do unix style trashing on an NTFS partition though. I
don't think people will expect that...

_______________________________________________
gnome-vfs-list mailing list
gnome-vfs-list@...
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list

Re: [PATCH] enable trash usage on NTFS partitions

by Yann Rouillard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Doesn't look so weird to me.
Why is it more natural to do trashing on vfat partition ?

If NTFS trash shouldn't be allowed, the other problem is that nautilus
doesn't take it into account and currently trash files on NTFS.
But that's a nautilus/gnomevfs issue, I don't know if nautilus/gvfs also
has this bug.

Is it EOL for gnome-vfs ?

Yann

Alexander Larsson wrote:

> On Tue, 2008-01-15 at 23:26 +0100, Yann Rouillard wrote:
>  
>> Hi,
>>
>> Trash usage is currently not allowed on NTFS partitions although NTFS
>> now supports write access.
>>
>> This simple patch allows trashing on NTFS partitions.
>>
>> The corresponding bugzilla issues is
>> http://bugzilla.gnome.org/show_bug.cgi?id=488699
>>
>> Note that nautilus currently doesn't use the
>> _gnome_vfs_filesystem_use_trash function which leads to bug like this
>> http://bugzilla.gnome.org/show_bug.cgi?id=157259 and
>> https://bugs.launchpad.net/ubuntu/+source/gnome-vfs2/+bug/140968
>> I will post another patch for this bug.
>>    
>
> Its kinda weird to do unix style trashing on an NTFS partition though. I
> don't think people will expect that...
>
>  

_______________________________________________
gnome-vfs-list mailing list
gnome-vfs-list@...
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list

Re: [PATCH] enable trash usage on NTFS partitions

by Alexander Larsson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wed, 2008-01-16 at 15:09 +0100, Yann Rouillard wrote:
> Doesn't look so weird to me.
> Why is it more natural to do trashing on vfat partition ?
>
> If NTFS trash shouldn't be allowed, the other problem is that nautilus
> doesn't take it into account and currently trash files on NTFS.
> But that's a nautilus/gnomevfs issue, I don't know if nautilus/gvfs also
> has this bug.

Well, NTFS has its own system for handling trash, doesn't it? And an
NTFS fs is likely shared with windows, which will show the ".trash"
directory in the root which is kind of weird.

But perhaps this is better than no trash support at all...

> Is it EOL for gnome-vfs ?

We still have to support the ABI, but don't expect to do any work on it
really.

_______________________________________________
gnome-vfs-list mailing list
gnome-vfs-list@...
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list

Re: [PATCH] enable trash usage on NTFS partitions

by David Zeuthen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wed, 2008-01-16 at 15:09 +0100, Yann Rouillard wrote:
> Why is it more natural to do trashing on vfat partition ?

Because vfat is used by a lot of current non-Windows users for removable
media / external harddisks (it's the only game in town for a fs without
uid's; e.g. making it possible to move disks around without messing
around with permissions). That, and a lot of non-Windows consumer
electronics, like cameras and audio/video players, use it.

      David


_______________________________________________
gnome-vfs-list mailing list
gnome-vfs-list@...
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list

Parent Message unknown Re: [PATCH] enable trash usage on NTFS partitions

by Yann Rouillard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alexander Larsson wrote:
>
>> Oh ? I am not aware of that.
>> After some quick research, it seems that under windows, trash files are
>> stored under the RECYCLER directory, but I didn't find anything about a
>> ntfs specific system.
>>    
>
> For NTFS only, or for vfat too?
>  
After some test, it appears, that:
     - on vfat, windows puts trashed files in a directory named "Recyled";
     - on ntfs, windows puts trashed files in a directory named "RECYCLER".

>>> And an
>>> NTFS fs is likely shared with windows, which will show the ".trash"
>>> directory in the root which is kind of weird.
>>>  
>>>      
>> That's not the same for vfat ?
>>    
>
> No, fat is used for all sorts of things, not only windows. For instance,
> most usb drives comes preformated with it, and all cameras etc use it
> for their memory cards.
>  
My point was just that the .Trash directory is currently also showned on
vfat partition mounted on windows, so if it's weird for ntfs, it is also
weird for vfat.

I agree vfat is more widely used and trash support missing on ntfs would
bug few people, however according to theses bugs reports [1][2], some
people use ntfs on usb disk or local partition, and I don't see any
drawback to enabling trash on ntfs (at least no more than on vfat).

Yann

[1] https://bugs.launchpad.net/ubuntu/+source/gnome-vfs2/+bug/140968
[2] https://bugs.launchpad.net/ubuntu/+source/gnome-vfs2/+bug/106621

_______________________________________________
gnome-vfs-list mailing list
gnome-vfs-list@...
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list