[vlc-devel] [RFC PATCH 4/7] sftp: change item i_type and i_browsable
Thomas Guillem
thomas at gllm.fr
Fri Mar 20 17:38:35 CET 2015
All items are ITEM_TYPE_NET, set i_browsable if the item is a directory.
---
modules/access/sftp.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 5c29a9c..05bf1d2 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -479,9 +479,12 @@ static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
}
free( psz_uri );
- int i_type = LIBSSH2_SFTP_S_ISDIR( attrs.permissions ) ? ITEM_TYPE_DIRECTORY : ITEM_TYPE_FILE;
- input_item_t *p_new = input_item_NewWithType( psz_full_uri, psz_file,
- 0, NULL, 0, 0, i_type );
+ int i_browsable = LIBSSH2_SFTP_S_ISDIR( attrs.permissions ) ?
+ ITEM_BROWSABLE : ITEM_NOT_BROWSABLE;
+ input_item_t *p_new = input_item_NewWithTypeExt( psz_full_uri, psz_file,
+ 0, NULL, 0, 0,
+ ITEM_TYPE_NET,
+ i_browsable );
if( p_new == NULL )
{
--
2.1.3
More information about the vlc-devel
mailing list