Make the check if printing is allowed the same as writing which is less

confusing.
pull/3573/head
nicm 2023-04-17 17:58:35 +00:00
parent 280fe77edd
commit bcafe51378
1 changed files with 3 additions and 3 deletions

6
file.c
View File

@ -177,9 +177,9 @@ file_fire_read(struct client_file *cf)
int
file_can_print(struct client *c)
{
if (c == NULL)
return (0);
if (c->session != NULL && (~c->flags & CLIENT_CONTROL))
if (c == NULL ||
(c->flags & CLIENT_ATTACHED) ||
(c->flags & CLIENT_CONTROL))
return (0);
return (1);
}