int mkd_res = mkdir(temppath, mode);
if(mkd_res != 0 && errno != EEXIST) {
- LOGL(LOG_SSENGINE,"cannot create dir %s\n system error: %d error: %s\n", temppath, errno, strerror(errno));
+ LOGL(LOG_SSENGINE,"cannot create dir %s\n system error: %d error: %m\n", temppath, errno);
return -E_SS_CANNOT_CREATE_DIRECTORY;
}
- if(path_token_len < (MAX_PATH-1)) {
- strcat(temppath, "/");
+ if(temppath_current_len < (MAX_PATH-1)) {
+ strncat(temppath, "/", 2);
}
}
return 0;