提交 f5c3fb29 authored 作者: dmichulke's avatar dmichulke

change newInputStream to only consider protocols consisting of alphabetic chars

上级 9ec2fad0
......@@ -293,8 +293,7 @@ public class FilePathDisk extends FilePath {
@Override
public InputStream newInputStream() throws IOException {
int index = name.indexOf(':');
if (index > 1 && index < 20) {
if (name.matches("[a-zA-Z]{2,19}:.*")) {
// if the ':' is in position 1, a windows file access is assumed:
// C:.. or D:, and if the ':' is not at the beginning, assume its a
// file name with a colon
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论