projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79c3c3a
)
Support/Unix/PathV2: Return the real error from realpath instead of any error
author
Michael J. Spencer
<bigcheesegs@gmail.com>
Tue, 7 Dec 2010 01:23:39 +0000
(
01:23
+0000)
committer
Michael J. Spencer
<bigcheesegs@gmail.com>
Tue, 7 Dec 2010 01:23:39 +0000
(
01:23
+0000)
that close or unlink set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121094
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/Unix/PathV2.inc
patch
|
blob
|
history
diff --git
a/lib/Support/Unix/PathV2.inc
b/lib/Support/Unix/PathV2.inc
index c547e6606f776998411d9d599dce27cf5099da8b..fc6b3867d57939b0da8d0794366f1acf5b48135b 100644
(file)
--- a/
lib/Support/Unix/PathV2.inc
+++ b/
lib/Support/Unix/PathV2.inc
@@
-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(err
no
, system_category());
+ return error_code(err
or
, system_category());
}
result_path.clear();