GNOME Bugzilla – Bug 97789
can't copy/move files to ncpfs file systems
Last modified: 2004-12-22 21:47:04 UTC
Nautilus can't copy/move files to ncpfs file systems because is_local() method of file module thinks that ncpfs is a local file system. Due to this, gnome_vfs_get_volume_free_space() calculates the free space, finds that free space is zero and Nautilus refuses to copy/move the file with the message "Not enough free space..." Free space info is not available on ncpfs, i.e. after a statvfs() or statfs() call f_bavail is always zero. Adding ncpfs to the list of filesystems recognized by is_local() as remote FS fixes the problem with Nautilus. While checking gnome_vfs_get_volume_free_space() I saw that unescaped_path may not be always freed. I moved the allocation/deallocation calls to insure that unescaped_path is always freed. Thanks!
Created attachment 12085 [details] [review] proposed patch
If ncpfs will be however considered a local file system because it is fast, then the new attachment adds logic to gnome_vfs_get_volume_free_space() to work around the problem.
Created attachment 12279 [details] [review] proposed patch to improve gnome_vfs_get_volume_free_space()
We were having the same error using RH 8 and RH 9 GNOME desktops with Nautilus. The patch described above fixes the problem. Could it be applied to future GNOME-VFS packages so it will always be available? Thanks.
*** Bug 101405 has been marked as a duplicate of this bug. ***
I'll commit soon this patch (unless alex screams). I cleaned up gnome_vfs_get_volume_free_space some more. I don't think ncfps should be special cased in get_volume_free_space since we can't return meaningful. Moreover, isn't ncpfs something similar to nfs which we can't know for sure if it will be fast or slow ?
Created attachment 16558 [details] [review] mark ncpfs as a non local file system
looks good to me.
Your patch looks good to me too. Thanks!
Radu: what is your real name so that I can add your full name to the ChangeLog (unless you don't want it to appear) ?
I committed the patch, I used a name returned by google when doing a search on your mail address, don't hesitate to complain if I got it wrong :)
gnome_vfs_get_volume_free_space assumed that it should be called only for local file systems, but change 1.62 removed the check for local file systems: 2003-03-25 Alexander Larsson <alexl@redhat.com> * libgnomevfs/gnome-vfs-utils.c (gnome_vfs_get_volume_free_space): statvfs works for nfs! So nautilus still can't copy files to ncpfs and I have to submit an updated patch to work around ncpfs in gnome_vfs_get_volume_free_space.
Created attachment 20228 [details] [review] proposed work around for ncpfs
Will this work with afs which is also special cased in file-method.c:is_local?
I don't know what afs returns for statfs. If you commit my patch, please delete the following comment. It's wrong because statvfs struct does not contain f_type. /* statvfs does not return f_type on ncpfs, we try again * with statfs. */
I committed your patch, but it broke compilation on solaris, cf #127193