Skip to content

Commit

Permalink
- set errno on failure so that the caller can still rely on strerror …
Browse files Browse the repository at this point in the history
…(reporting wrong error w/o this change)
  • Loading branch information
pierrejoye committed Feb 1, 2010
1 parent e1cdfbe commit f25710d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TSRM/tsrm_virtual_cwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,11 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
TSRMLS_FETCH();

if (path_length == 0 || path_length >= MAXPATHLEN-1) {
#ifdef TSRM_WIN32
_set_errno(EINVAL);
#else
errno = EINVAL
#endif
return 1;
}

Expand Down

0 comments on commit f25710d

Please sign in to comment.