imagej / imagej-launcher

The ImageJ native launcher
https://imagej.net/learn/launcher
BSD 2-Clause "Simplified" License
21 stars 18 forks source link

Consider files with an mtime of 0 as well #85

Closed ximion closed 2 years ago

ximion commented 2 years ago

Hi! When creating a Flatpak bundle for Fiji, I stumbled upon this issue which was fairly hard to find even though it's quite simple. Flatpak doesn't save mtimes, which trips up imagej-launcher and makes it refuse to launch anything. Regardless of this quirk, if stat worked the file exists and we should consider it for launching, so checking for bigger-or-equal zero is the slightly more correct behavior. Merging this helps the Flatpak Fiji PR at https://github.com/fiji/fiji-builds/pull/8, so we don't need to carry an extra patch. It should also not cause any problems with existing installations. Thanks for considering!

ctrueden commented 2 years ago

Thanks @ximion! I noticed this patch in fiji/fiji-builds#8 as well; I'll make a new imagej-launcher release and update that PR to use it.