Open Jerry-Ma opened 2 years ago
It turns out that the asn_make_pool commandline interface is very easily to be misused so that image files are clobbered silently, because both the pool file and image files are position arguments:
asn_make_pool <pool_file> <image_file1> [image_file2] ...
When mistakenly run commands like asn_make_pool *.fits, the first image file is clobbered with the content of the output pool table file.
asn_make_pool *.fits
Possible solutions:
Add check of first file to make sure it does not clobber when exists unless a flag like --overwrite is specified.
--overwrite
Make the pool file non-positional, such as asn_make_pool --output pool_file *.fits
asn_make_pool --output pool_file *.fits
Thank you for the report!
There is enough information to reproduce locally. This issue will be updated when work has been started/completed.
It turns out that the asn_make_pool commandline interface is very easily to be misused so that image files are clobbered silently, because both the pool file and image files are position arguments:
When mistakenly run commands like
asn_make_pool *.fits
, the first image file is clobbered with the content of the output pool table file.Possible solutions:
Add check of first file to make sure it does not clobber when exists unless a flag like
--overwrite
is specified.Make the pool file non-positional, such as
asn_make_pool --output pool_file *.fits