diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pj_open_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index 22c180a8..bc8c98ac 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -161,14 +161,14 @@ pj_open_lib(projCtx ctx, char *name, char *mode) { errno = 0; } + if( ctx->last_errno == 0 && errno != 0 ) + pj_ctx_set_errno( ctx, errno ); + pj_log( ctx, PJ_LOG_DEBUG_MAJOR, "pj_open_lib(%s): call fopen(%s) - %s\n", name, sysname, fid == NULL ? "failed" : "succeeded" ); - if( ctx->last_errno == 0 && errno != 0 ) - pj_ctx_set_errno( ctx, errno ); - return(fid); #else return NULL; |
