xrealpath: give more user-friendly error messages
这个提交包含在:
父节点
8b6291b6ca
当前提交
519afe63d1
|
@ -103,7 +103,8 @@ char *xrealpath(const char *path, char *resolved_path)
|
||||||
char *tmp = realpath(path, resolved_path);
|
char *tmp = realpath(path, resolved_path);
|
||||||
if(tmp == NULL)
|
if(tmp == NULL)
|
||||||
{
|
{
|
||||||
perror("realpath");
|
char *errorstr = strerror(errno);
|
||||||
|
fprintf(stderr, "realpath on %s failed: %s\n", path, errorstr);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
return tmp;
|
return tmp;
|
||||||
|
|
正在加载...
在新工单中引用