Merge pull request #5497 from Rouzip/remove-redundant

agent: remove redundant checks
This commit is contained in:
Bin Liu
2022-10-24 16:41:49 +08:00
committed by GitHub

View File

@@ -327,7 +327,7 @@ impl Sandbox {
// Reject non-file, symlinks and non-executable files
if !entry.file_type()?.is_file()
|| entry.file_type()?.is_symlink()
|| entry.metadata()?.permissions().mode() & 0o777 & 0o111 == 0
|| entry.metadata()?.permissions().mode() & 0o111 == 0
{
continue;
}