[vlc-commits] gvfs: fix initial file size check

Rémi Denis-Courmont git at videolan.org
Mon Aug 31 17:45:05 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 31 18:34:01 2015 +0300| [68dcab3d6ebf923e69b298d988703e500b9fc04c] | committer: Rémi Denis-Courmont

gvfs: fix initial file size check

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68dcab3d6ebf923e69b298d988703e500b9fc04c
---

 modules/access/gnomevfs.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/access/gnomevfs.c b/modules/access/gnomevfs.c
index 18cb87d..a3f7c22 100644
--- a/modules/access/gnomevfs.c
+++ b/modules/access/gnomevfs.c
@@ -225,10 +225,11 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    if( p_sys->b_seekable && !p_sys->p_file_info->size )
+    if( p_sys->b_seekable
+    && !(p_sys->p_file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) )
     {
         /* FIXME that's bad because all others access will be probed */
-        msg_Warn( p_access, "file %s is empty, aborting", psz_name );
+        msg_Warn( p_access, "file %s size is unknown, aborting", psz_name );
         gnome_vfs_file_info_unref( p_sys->p_file_info );
         gnome_vfs_uri_unref( p_uri);
         free( p_sys );



More information about the vlc-commits mailing list