[vlc-devel] [PATCH] ftp: fix directory listing with legacy server
Felix Paul Kühne
fkuehne at videolan.org
Wed May 20 15:21:46 CEST 2020
From: Felix Paul Kühne <felix at feepk.net>
A legacy ftp server included in macOS 10.6 and earlier tried to be clever and gives the keys as Uppercase so VLC failed to determine the item type.
---
modules/access/ftp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index 0118ec7d9e..45da6edf1c 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -936,9 +936,9 @@ static int DirRead (stream_t *p_access, input_item_node_t *p_current_node)
if( p_sys->features.b_mlst )
{
/* MLST Format is key=val;key=val...; FILENAME */
- if( strstr( psz_line, "type=dir" ) )
+ if( strcasestr( psz_line, "type=dir" ) )
type = ITEM_TYPE_DIRECTORY;
- if( strstr( psz_line, "type=file" ) )
+ if( strcasestr( psz_line, "type=file" ) )
type = ITEM_TYPE_FILE;
/* Get the filename or fail */
--
2.21.1 (Apple Git-122.3)
More information about the vlc-devel
mailing list