Johann150
e27c6abaea
* simplify temporary files for thumbnails Because only a single file will be written to the directory, creating a separate directory seems unnecessary. If only a temporary file is created, the code from `createTemp` can be reused here as well. * refactor: deduplicate code for temporary files/directories To follow the DRY principle, the same code should not be duplicated across different files. Instead an already existing function is used. Because temporary directories are also create in multiple locations, a function for this is also newly added to reduce duplication. * fix: clean up identicon temp files The temporary files for identicons are not reused and can be deleted after they are fully read. This condition is met when the stream is closed and so the file can be cleaned up using the events API of the stream. * fix: ensure cleanup is called when download fails * fix: ensure cleanup is called in error conditions This covers import/export queue jobs and is mostly just wrapping all code in a try...finally statement where the finally runs the cleanup. * fix: use correct type instead of `any` |
||
---|---|---|
.. | ||
blocking | ||
chart | ||
drive | ||
following | ||
i | ||
messages | ||
note | ||
user-list | ||
add-note-to-antenna.ts | ||
create-notification.ts | ||
create-system-user.ts | ||
fetch-instance-metadata.ts | ||
insert-moderation-log.ts | ||
instance-actor.ts | ||
logger.ts | ||
push-notification.ts | ||
register-or-fetch-instance-doc.ts | ||
relay.ts | ||
send-email-notification.ts | ||
send-email.ts | ||
stream.ts | ||
suspend-user.ts | ||
unsuspend-user.ts | ||
update-hashtag.ts | ||
user-cache.ts | ||
validate-email-for-account.ts |