• R/O
  • SSH

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Crystal library and CLI tool for Catbox.moe


Commit MetaInfo

修订版9124e4d13bd9b689fa0d2bc6680373e54f38431e (tree)
时间2021-11-08 18:17:33
作者Remilia Scarlet <remilia@post...>
CommiterRemilia Scarlet

Log Message

Check that files exist when uploading

更改概述

差异

diff -r fef44e380891 -r 9124e4d13bd9 tools/catboxtool.cr
--- a/tools/catboxtool.cr Thu Nov 04 00:11:13 2021 -0600
+++ b/tools/catboxtool.cr Mon Nov 08 02:17:33 2021 -0700
@@ -87,7 +87,12 @@
8787 if RemiCatbox::URL_REGEX.match(file)
8888 puts "Uploading #{file}..."
8989 else
90- puts "Uploading #{Path[file].basename}..."
90+ if File.exists?(file)
91+ puts "Uploading #{Path[file].basename}..."
92+ else
93+ RemiLog.log.error("File not found: #{file}")
94+ next
95+ end
9196 end
9297
9398 # Do the actual upload