KEMBAR78
Avoid unnecessary `isfile`/`exists` calls by akx · Pull Request #14527 · AUTOMATIC1111/stable-diffusion-webui · GitHub
Skip to content

Conversation

akx
Copy link
Collaborator

@akx akx commented Jan 3, 2024

Description

No need to do an extra syscall to figure out if a file is a file or if it exists if we can just catch a FileNotFoundError or similar.

Also kind of avoids a couple possible TOCTOU races.

Screenshots/videos:

Nope

Checklist:

@akx akx marked this pull request as ready for review January 3, 2024 22:28
@akx akx requested a review from AUTOMATIC1111 as a code owner January 3, 2024 22:28
@AUTOMATIC1111 AUTOMATIC1111 merged commit 397251b into AUTOMATIC1111:dev Jan 4, 2024
@w-e-w w-e-w mentioned this pull request Feb 17, 2024
@pawel665j pawel665j mentioned this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants