dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
661 stars 185 forks source link

create_temp_file() fixed #209

Closed polakovic closed 3 years ago

polakovic commented 3 years ago

create_temp_file() is called from many places with hardcoded /tmp directory what fails in sandboxed environments. This change attempts to use TMP env variable in such case.

dstndstn commented 3 years ago

I don't see these calls to create_temp_file()... I do see lots of create_temp_file(fn, axy->tempdir), where that temp dir is hard-coded to "/tmp", here, https://github.com/dstndstn/astrometry.net/blob/master/solver/augment-xylist.c#L49

Could I ask you to change this PR to call create_temp_dir() there instead?

The other calls to create_temp_file() with hard-coded "/tmp" are in the test programs -- please also remove those -- you can just set it to NULL to automatically select a temp dir.

polakovic commented 3 years ago

OK, I'll look at it later.