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 @@ -220,7 +220,7 @@ export default class WebDavAdapter extends CachingAdapter {
220220 Logger . log ( 'Error getting file size: ' + e . message )
221221 }
222222
223- if ( fileSize === null ) {
223+ if ( fileSize === null || Number . isNaN ( fileSize ) ) {
224224 throw new FileSizeUnknown ( )
225225 }
226226
@@ -490,7 +490,7 @@ export default class WebDavAdapter extends CachingAdapter {
490490 }
491491
492492 const xml = await res . text ( )
493- const match = xml . match ( / < .* ?: ? g e t c o n t e n t l e n g t h > ( .* ?) < / )
493+ const match = xml . match ( / < .* ?: ? g e t c o n t e n t l e n g t h [ ^ > ] * ? > ( .* ?) < / )
494494 return match ? parseInt ( match [ 1 ] ) : null
495495 }
496496
@@ -526,7 +526,7 @@ export default class WebDavAdapter extends CachingAdapter {
526526 }
527527
528528 const xml = res . data
529- const match = xml . match ( / < .* ?: ? g e t c o n t e n t l e n g t h > ( .* ?) < / )
529+ const match = xml . match ( / < .* ?: ? g e t c o n t e n t l e n g t h [ ^ > ] * ? > ( .* ?) < / )
530530 return match ? parseInt ( match [ 1 ] ) : null
531531 }
532532
You can’t perform that action at this time.
0 commit comments