Re: gnome-vfs freeze break request - smb directory type



man, 06,.09.2004 kl. 10.54 +0200, skrev Alexander Larsson:
> There is a small bug in the smb backend. When readdir a location like
> smb://<server> it returns a directory (type ==
> GNOME_VFS_FILE_TYPE_DIRECTORY) with a mimetype of "x-directory/smb-
> share".
> 
> Unfortunately, even though it sets the type, it forgets to set the
> GNOME_VFS_FILE_INFO_FIELDS_TYPE flag in "valid_fields". This means that
> nautilus will not be able to open the directory, because it doesn't
> think the file is a directory.
> 
> Very simple patch:
> 
> Index: modules/smb-method.c
> ===================================================================
> RCS file: /cvs/gnome/gnome-vfs/modules/smb-method.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 smb-method.c
> --- modules/smb-method.c	25 Aug 2004 17:22:18 -0000	1.8
> +++ modules/smb-method.c	6 Sep 2004 08:46:13 -0000
> @@ -1709,7 +1709,8 @@ do_read_directory (GnomeVFSMethod *metho
>  	switch (entry->smbc_type) {
>  	case SMBC_FILE_SHARE:
>  		file_info->valid_fields = file_info->valid_fields
> -			| GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE;
> +			| GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE
> +			| GNOME_VFS_FILE_INFO_FIELDS_TYPE;
>  		file_info->type = GNOME_VFS_FILE_TYPE_DIRECTORY;
>  		file_info->mime_type = g_strdup ("x-directory/smb-share");
>  		break;
> 
> 
> Ok to commit?
> 
Seems trivial enough to me if you promise to make 10 people test it :-)

1 of 2

Cheers
Kjartan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]