# HG changeset patch # User albeu # Date 1060776565 0 # Node ID 98c885b1ff06d2472c6fcb116ce8260d9bc5f035 # Parent 0d381b648b51e99a63a8ccd1746ab88fa175f154 Fix a 10l and add escaped filename support. Needed by ftp. diff -r 0d381b648b51 -r 98c885b1ff06 m_option.c --- a/m_option.c Wed Aug 13 11:18:24 2003 +0000 +++ b/m_option.c Wed Aug 13 12:09:25 2003 +0000 @@ -1672,6 +1672,8 @@ } } } + ptr1 = ptr2+1; + pos1 = ptr1-url; } // before looking for a port number check if we have an IPv6 type numeric address @@ -1752,7 +1754,15 @@ // skip } else { if(dst) { - r = m_struct_set(desc,dst,"filename",ptr2+1); + int l = strlen(ptr2+1) + 1; + char* fname = ptr2+1; + if(l > 1) { + fname = malloc(l); + url_unescape_string(fname,ptr2+1); + } + r = m_struct_set(desc,dst,"filename",fname); + if(fname != ptr2+1) + free(fname); if(r < 0) { mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: error while setting filename\n",name); return r;