added macro RESULT_ERROR_FMT and some filesystem functions
This commit is contained in:
@@ -35,7 +35,7 @@ Result(void) dir_create(cstr path){
|
||||
if(mkdir(path, 0777) == -1)
|
||||
#endif
|
||||
{
|
||||
return RESULT_ERROR(sprintf_malloc(512, "can't create dicectory '%s'", path), true);
|
||||
return RESULT_ERROR_FMT("Can't create dicectory '%s': %s", path, strerror(errno));
|
||||
}
|
||||
|
||||
return RESULT_VOID;
|
||||
|
||||
Reference in New Issue
Block a user