提交 e1d9dc9e authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #582 from dmichulke/master

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