mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-12 02:56:29 +00:00
Fix crash when disk is full
This commit is contained in:
parent
9dbd819313
commit
80d963fab6
1 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,6 @@ const m3u8Regex* = re"""url="(.+.m3u8)""""
|
|||
proc createMediaRouter*(cfg: Config) =
|
||||
router media:
|
||||
get "/pic/?":
|
||||
echo "empty pic"
|
||||
resp Http404
|
||||
|
||||
get "/pic/@url":
|
||||
|
@ -41,6 +40,9 @@ proc createMediaRouter*(cfg: Config) =
|
|||
client.safeClose()
|
||||
removeFile(filename)
|
||||
resp Http404
|
||||
except OSError:
|
||||
echo "Disk full"
|
||||
resp Http404
|
||||
finally:
|
||||
client.safeClose()
|
||||
|
||||
|
|
Loading…
Reference in a new issue