Skip to content

Commit

Permalink
🐛 fileのときだけ処理するように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
jiro4989 committed Jan 30, 2020
1 parent e334d70 commit 8deceec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions websh_server/src/websh_server.nim
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ router myrouter:
# 画像ファイルをbase64に変換
var images: seq[ImageObj]
for path in walkFiles(imageDir / "*"):
if not path.existsFile:
continue
let (dir, name, ext) = splitFile(path)
if ext.toLowerAscii notin [".png", ".jpg", ".jpeg", ".gif"]:
continue
Expand Down

0 comments on commit 8deceec

Please sign in to comment.