1
0
Derivar 0

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

Este cometimento está contido em:
Albert S. 2020-09-26 18:42:27 +02:00
ascendente 9f2f0e66b2
cometimento aaa6670eda
1 ficheiros modificados com 6 adições e 0 eliminações

Ver ficheiro

@ -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 {