Skip to content

Commit 67ce923

Browse files
committed
Allow more error checking to show user that file is missing
1 parent a0db1cb commit 67ce923

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/thumbnailer_server.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,21 @@ function check_output(ret, output_path)
6464
return nil
6565
end
6666

67+
local success = true
68+
6769
if ret.error or ret.status ~= 0 then
6870
msg.error("Thumbnailing command failed!")
6971
msg.error(ret.error or ret.stdout)
7072

71-
return false
73+
success = false
7274
end
7375

7476
if not file_exists(output_path) then
75-
msg.error("Output file missing!")
76-
return false
77+
msg.error("Output file missing!", output_path)
78+
success = false
7779
end
7880

79-
return true
81+
return success
8082
end
8183

8284

0 commit comments

Comments
 (0)