Skip to content

Commit

Permalink
Extract filename from cleaned path (for consistent separator handling)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Nov 14, 2022
1 parent 588a702 commit 7d2543e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -304,7 +304,8 @@ protected URL createRelativeURL(String relativePath) throws MalformedURLExceptio
@Override
@Nullable
public String getFilename() {
String filename = StringUtils.getFilename(this.uri != null ? this.uri.getPath() : this.url.getPath());
String originalPath = (this.uri != null ? this.uri.getPath() : this.url.getPath());
String filename = StringUtils.getFilename(StringUtils.cleanPath(originalPath));
return (filename != null ? URLDecoder.decode(filename, StandardCharsets.UTF_8) : null);
}

Expand Down

0 comments on commit 7d2543e

Please sign in to comment.