Watch
1
0
Fork
You've already forked nitter
0
mirror of https://github.com/zedeus/nitter synced 2026-11-22 12:57:19 +00:00

Fix exception when image path is empty

This commit is contained in:
Zed 2019-10-24 00:04:54 +02:00
commit a56f217074

View file

@ -21,6 +21,9 @@ proc createMediaRouter*(cfg: Config) =
let path = uri.path.split("/")[2 .. ^1].join("/")
let filename = cfg.cacheDir / cleanFilename(path & uri.query)
if path.len == 0:
resp Http404
if not existsDir(cfg.cacheDir):
createDir(cfg.cacheDir)