check whether entry is file. avoids 'raou .' panic

这个提交包含在:
Albert S. 2020-09-26 18:42:27 +02:00
父节点 9f2f0e66b2
当前提交 aaa6670eda

查看文件

@ -262,6 +262,12 @@ fn exec(entryname: &str, cmdargs: &Vec<String>) -> std::io::Result<()> {
"Specified entry is outside base directory",
));
}
if ! p.is_file() {
return Err(std::io::Error::new(
ErrorKind::Other,
"Error: Entry not a file",
));
}
}
Err(e) => {
if e.kind() == ErrorKind::NotFound {