wlandsman / IDLAstro

Astronomy related procedures in the commercial IDL language
https://asd.gsfc.nasa.gov/archive/idlastro/
BSD 2-Clause "Simplified" License
144 stars 64 forks source link

fits_open: Wrap filenames in "" before spawning subprocesses, to allow spaces #3

Closed mperrin closed 9 years ago

mperrin commented 9 years ago

Minor set of fixes to fits_open.pro: We encountered a bug where filenames that had spaces in their directory paths, and ended in .gz, caused the gzip step to fail. By wrapping the filename in spaces in the spawn command, spaces and other atypical characters such as dollar signs and parenthesis are acceptable in filenames and directory paths of gzipped files.

Note: I made my fixes based on a copy of fits_open from the web site (http://idlastro.gsfc.nasa.gov/ftp/pro/fits/fits_open.pro) which includes some April 2014 modifications that aren't present in the github version of the library for some reason. Presumably you know what's going on here better than I do. I just mention this because that is the source of most of the diffs in this pull request, and my edits are comparatively small being just the addition of some " characters on the spawn lines.

wlandsman commented 9 years ago

Marshall,

Thanks for the update.    Yes, the GitHub site gets updated less often

than http:://idlastro.gsfc.nasa.gov but your FITS_OPEN update should now be in both places.

On Mon, Nov 10, 2014 at 2:30 AM, Marshall Perrin notifications@github.com wrote:

Minor set of fixes to fits_open.pro: We encountered a bug where filenames that had spaces in their directory paths, and ended in .gz, caused the gzip step to fail. By wrapping the filename in spaces in the spawn command, spaces and other atypical characters such as dollar signs and parenthesis are acceptable in filenames and directory paths of gzipped files.

Note: I made my fixes based on a copy of fits_open from the web site ( http://idlastro.gsfc.nasa.gov/ftp/pro/fits/fits_open.pro) which includes some April 2014 modifications that aren't present in the github version of the library for some reason. Presumably you know what's going on here better than I do. I just mention this because that is the source of most of the diffs in this pull request, and my edits are comparatively small being

just the addition of some " characters on the spawn lines.

You can merge this Pull Request by running

git pull https://github.com/mperrin/IDLAstro master

Or view, comment on, or merge it at:

https://github.com/wlandsman/IDLAstro/pull/3 Commit Summary

  • Wrap filenames in "" before spawning subprocesses, to allow spaces

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/wlandsman/IDLAstro/pull/3.