xrealpath: give more user-friendly error messages

このコミットが含まれているのは:
Albert S. 2020-08-15 22:33:35 +02:00
コミット 519afe63d1
1個のファイルの変更2行の追加1行の削除

ファイルの表示

@ -103,7 +103,8 @@ char *xrealpath(const char *path, char *resolved_path)
char *tmp = realpath(path, resolved_path);
if(tmp == NULL)
{
perror("realpath");
char *errorstr = strerror(errno);
fprintf(stderr, "realpath on %s failed: %s\n", path, errorstr);
exit(EXIT_FAILURE);
}
return tmp;