mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-29 23:16:28 +00:00
Support/Unix/PathV2: Return the real error from realpath instead of any error
that close or unlink set. llvm-svn: 121094
This commit is contained in:
parent
6874ebd344
commit
2953ba9e66
@ -395,9 +395,10 @@ rety_open_create:
|
||||
// Make the path absolute.
|
||||
char real_path_buff[PATH_MAX + 1];
|
||||
if (realpath(RandomPath.c_str(), real_path_buff) == NULL) {
|
||||
int error = errno;
|
||||
::close(RandomFD);
|
||||
::unlink(RandomPath.c_str());
|
||||
return error_code(errno, system_category());
|
||||
return error_code(error, system_category());
|
||||
}
|
||||
|
||||
result_path.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user