Skip to content

Commit

Permalink
Merged pull request #172
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed May 26, 2015
2 parents fffdb86 + 03f923c commit 29e049f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions usefulstuff.c
Expand Up @@ -344,15 +344,23 @@ char *xdebug_path_to_url(const char *fileurl TSRMLS_DC)
cwd[0] = '\0';
}

#if PHP_VERSION_ID >= 50600
new_state.cwd = estrdup(cwd);
#else
new_state.cwd = strdup(cwd);
#endif
new_state.cwd_length = strlen(cwd);

if (!virtual_file_ex(&new_state, fileurl, NULL, 1 TSRMLS_CC)) {
char *s = estrndup(new_state.cwd, new_state.cwd_length);
tmp = xdebug_sprintf("file://%s",s);
efree(s);
}
#if PHP_VERSION_ID >= 50600
efree(new_state.cwd);
#else
free(new_state.cwd);
#endif

} else if (fileurl[1] == '/' || fileurl[1] == '\\') {
/* convert UNC paths (eg. \\server\sharepath) */
Expand Down

0 comments on commit 29e049f

Please sign in to comment.