mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
Handle filesystems no supporting reporting how much is free. This fixes
2009-03-03 Alexander Larsson <alexl@redhat.com> * glocalfile.c (g_local_file_query_filesystem_info): Handle filesystems no supporting reporting how much is free. This fixes bug 573454 where the filesystem not supporting this is the gvfs smb backend over the fuse filesystem. svn path=/trunk/; revision=7951
This commit is contained in:
parent
eda741ad4d
commit
0b9f24c1e1
@ -1,3 +1,10 @@
|
|||||||
|
2009-03-03 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* glocalfile.c (g_local_file_query_filesystem_info):
|
||||||
|
Handle filesystems no supporting reporting how much is free.
|
||||||
|
This fixes bug 573454 where the filesystem not supporting this
|
||||||
|
is the gvfs smb backend over the fuse filesystem.
|
||||||
|
|
||||||
2009-03-02 Matthias Clasen <mclasen@redhat.com>
|
2009-03-02 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.19.10 ===
|
* === Released 2.19.10 ===
|
||||||
|
@ -957,14 +957,13 @@ g_local_file_query_filesystem_info (GFile *file,
|
|||||||
#endif
|
#endif
|
||||||
block_size = statfs_buffer.f_bsize;
|
block_size = statfs_buffer.f_bsize;
|
||||||
|
|
||||||
#if defined(__linux__)
|
/* Many backends can't report free size (for instance the gvfs fuse
|
||||||
/* ncpfs does not know the amount of available and free space *
|
backend for backend not supporting this), and set f_bfree to 0,
|
||||||
* assuming ncpfs is linux specific, if you are on a non-linux platform
|
but it can be 0 for real too. We treat the availible == 0 and
|
||||||
* where ncpfs is available, please file a bug about it on bugzilla.gnome.org
|
free == 0 case as "both of these are invalid".
|
||||||
*/
|
*/
|
||||||
if (statfs_buffer.f_bavail == 0 && statfs_buffer.f_bfree == 0 &&
|
#ifndef G_OS_WIN32
|
||||||
/* linux/ncp_fs.h: NCP_SUPER_MAGIC == 0x564c */
|
if (statfs_buffer.f_bavail == 0 && statfs_buffer.f_bfree == 0)
|
||||||
statfs_buffer.f_type == 0x564c)
|
|
||||||
no_size = TRUE;
|
no_size = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user