mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-12 11:06:30 +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) =
|
proc createMediaRouter*(cfg: Config) =
|
||||||
router media:
|
router media:
|
||||||
get "/pic/?":
|
get "/pic/?":
|
||||||
echo "empty pic"
|
|
||||||
resp Http404
|
resp Http404
|
||||||
|
|
||||||
get "/pic/@url":
|
get "/pic/@url":
|
||||||
|
@ -41,6 +40,9 @@ proc createMediaRouter*(cfg: Config) =
|
||||||
client.safeClose()
|
client.safeClose()
|
||||||
removeFile(filename)
|
removeFile(filename)
|
||||||
resp Http404
|
resp Http404
|
||||||
|
except OSError:
|
||||||
|
echo "Disk full"
|
||||||
|
resp Http404
|
||||||
finally:
|
finally:
|
||||||
client.safeClose()
|
client.safeClose()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue