After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 97789 - can't copy/move files to ncpfs file systems
can't copy/move files to ncpfs file systems
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: File operations
cvs (head)
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 101405 (view as bug list)
Depends on: 127193
Blocks:
 
 
Reported: 2002-11-06 01:10 UTC by radu
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.60 KB, patch)
2002-11-06 01:11 UTC, radu
none Details | Review
proposed patch to improve gnome_vfs_get_volume_free_space() (1.45 KB, patch)
2002-11-13 13:55 UTC, radu
none Details | Review
mark ncpfs as a non local file system (2.98 KB, patch)
2003-05-15 22:32 UTC, Christophe Fergeau
none Details | Review
proposed work around for ncpfs (1.35 KB, patch)
2003-09-23 22:38 UTC, radu
none Details | Review

Description radu 2002-11-06 01:10:48 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!
Comment 1 radu 2002-11-06 01:11:26 UTC
Created attachment 12085 [details] [review]
proposed patch
Comment 2 radu 2002-11-13 13:53:14 UTC
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.
Comment 3 radu 2002-11-13 13:55:17 UTC
Created attachment 12279 [details] [review]
proposed patch to improve gnome_vfs_get_volume_free_space()
Comment 4 olamar 2003-05-12 17:43:20 UTC
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.
Comment 5 Christophe Fergeau 2003-05-14 08:02:16 UTC
*** Bug 101405 has been marked as a duplicate of this bug. ***
Comment 6 Christophe Fergeau 2003-05-15 22:27:18 UTC
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 ?
Comment 7 Christophe Fergeau 2003-05-15 22:32:13 UTC
Created attachment 16558 [details] [review]
mark ncpfs as a non local file system
Comment 8 Alexander Larsson 2003-05-16 13:42:01 UTC
looks good to me.
Comment 9 radu 2003-05-16 14:54:57 UTC
Your patch looks good to me too.

Thanks!
Comment 10 Christophe Fergeau 2003-05-16 15:53:02 UTC
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) ?
Comment 11 Christophe Fergeau 2003-05-16 18:17:56 UTC
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 :)
Comment 12 radu 2003-09-23 22:37:09 UTC
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.
Comment 13 radu 2003-09-23 22:38:20 UTC
Created attachment 20228 [details] [review]
proposed work around for ncpfs
Comment 14 Alexander Larsson 2003-09-24 07:29:14 UTC
looks good to me.
Comment 15 Christophe Fergeau 2003-09-24 07:36:42 UTC
Will this work with afs which is also special cased in
file-method.c:is_local?
Comment 16 radu 2003-09-24 08:04:05 UTC
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.
 */
Comment 17 Christophe Fergeau 2003-11-17 14:58:50 UTC
I committed your patch, but it broke compilation on solaris, cf #127193