vengi-voxel / vengi

free and open source voxel art tools - editor, thumbnailer and format converter
http://vengi-voxel.github.io/vengi/
Other
1.05k stars 87 forks source link

VOXCONVERT: creates invalid output and returns with code 0 even on failure #385

Closed hkunz closed 5 months ago

hkunz commented 5 months ago

When you supply an invalid voxel file format type like .hhh extension, voxconvert will output an invalid file like out.hhh with 0kb size as in the following example:

> .\vengi-voxconvert.exe --input "C:\untitled.obj" --output "C:\out.hhh"

WARN: (0) Failed to save file C:/out.hhh - saving as vengi instead
INFO: (0) Wrote output file C:/out.hhh

And when you trace the return code, it says it is 0 for success instead of 1 for failure.

> $LASTEXITCODE 
0

I think it should return 1 for failure