Commit 4816386e84329f81123d30d99b7c5751e1994556
1 parent
30d27bfb
open file readonly if status = 105
Showing
1 changed file
with
3 additions
and
3 deletions
src/fits/GFits.cpp
| ... | ... | @@ -181,14 +181,14 @@ void GFits::open(const std::string& filename) |
| 181 | 181 | status = 0; |
| 182 | 182 | status = __ffinit(&m_fitsfile, filename.c_str(), &status); |
| 183 | 183 | } |
| 184 | - | |
| 184 | + | |
| 185 | 185 | // If FITS file is readonly then open as readonly |
| 186 | - else if (status == 112) { | |
| 186 | + else if (status == 112 or status == 105) { | |
| 187 | 187 | status = 0; |
| 188 | 188 | status = __ffopen(&m_fitsfile, filename.c_str(), 0, &status); |
| 189 | 189 | m_readwrite = 0; |
| 190 | 190 | } |
| 191 | - | |
| 191 | + | |
| 192 | 192 | // Throw any other error |
| 193 | 193 | if (status != 0) |
| 194 | 194 | throw GException::fits_open_error(G_OPEN, filename, status); | ... | ... |