-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla
Description
| Bugzilla Link | 8520 |
| Resolution | FIXED |
| Resolved on | Aug 21, 2011 09:06 |
| Version | trunk |
| OS | Windows XP |
| Blocks | llvm/llvm-bugzilla-archive#9099 |
| Reporter | LLVM Bugzilla Contributor |
| CC | @AaronBallman |
Extended Description
C:\path\to> clang foo.c -S -o nul
error: unable to rename temporary 'nul-000000' to output file 'nul': 'Can't move
'nul-000000' to 'nul': Cannot create a file when that file already exists.
'
1 error generated.
clang: error: unable to remove file:
===
It is due to sys::Path::isRegularFile().
My workaround is below. It seems there is no way to detect
reserved filenames ("nul", "con", &c) with Win32API.
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -369,6 +369,9 @@ bool
Path::isRegularFile() const {
if (isDirectory())
return false;
- if (getBasename().size() == 3
-
&& memcmp(getBasename().data(), "nul", 3) == 0) - return false;
return true;
}
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla