Skip to content
Snippets Groups Projects
Commit bcc79fbf authored by LE QUEC Nicolas's avatar LE QUEC Nicolas Committed by Jean-Baptiste Kempf
Browse files

archive: get mtime and size of the item

Refs #25747
parent bd8183e3
No related branches found
No related tags found
No related merge requests found
......@@ -547,12 +547,23 @@ static int ReadDir( stream_directory_t* p_directory, input_item_node_t* p_node )
if( unlikely( !mrl ) )
break;
input_item_t *p_item;
if( vlc_readdir_helper_additem( &rdh, mrl, path, NULL, ITEM_TYPE_FILE,
ITEM_LOCAL, NULL ) )
ITEM_LOCAL, &p_item ) )
{
free( mrl );
break;
}
if ( p_item )
{
time_t mtime = archive_entry_mtime( entry );
if( mtime >= 0 )
input_item_AddStat( p_item, "mtime", mtime );
int64_t size = archive_entry_size( entry );
if( size >= 0 )
input_item_AddStat( p_item, "size", size );
}
free( mrl );
if( archive_read_data_skip( p_arc ) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment