File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -55,15 +55,15 @@ const downloadNodes = function(nodes: Node[]) {
5555 url . searchParams . append ( 'accept' , 'zip' )
5656 }
5757 } else {
58- url = new URL ( nodes [ 0 ] . source )
58+ url = new URL ( nodes [ 0 ] . encodedSource )
5959 let base = url . pathname
6060 for ( const node of nodes . slice ( 1 ) ) {
61- base = longestCommonPath ( base , ( new URL ( node . source ) . pathname ) )
61+ base = longestCommonPath ( base , ( new URL ( node . encodedSource ) . pathname ) )
6262 }
6363 url . pathname = base
6464
6565 // The URL contains the path encoded so we need to decode as the query.append will re-encode it
66- const filenames = nodes . map ( ( node ) => decodeURI ( node . encodedSource . slice ( url . href . length + 1 ) ) )
66+ const filenames = nodes . map ( ( node ) => decodeURIComponent ( node . encodedSource . slice ( url . href . length + 1 ) ) )
6767 url . searchParams . append ( 'accept' , 'zip' )
6868 url . searchParams . append ( 'files' , JSON . stringify ( filenames ) )
6969 }
You can’t perform that action at this time.
0 commit comments