mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 23:48:56 +00:00
Windows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.
FIXME: It is a temporal hack. We should detect as many "special file name" as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127724 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bfb25cd97c
commit
bab2d49d4a
@ -449,7 +449,14 @@ error_code status(const Twine &path, file_status &result) {
|
|||||||
SmallString<128> path_storage;
|
SmallString<128> path_storage;
|
||||||
SmallVector<wchar_t, 128> path_utf16;
|
SmallVector<wchar_t, 128> path_utf16;
|
||||||
|
|
||||||
if (error_code ec = UTF8ToUTF16(path.toStringRef(path_storage),
|
StringRef path8 = path.toStringRef(path_storage);
|
||||||
|
// FIXME: We should detect as many "special file name" as possible.
|
||||||
|
if (path8.compare_lower("nul") == 0) {
|
||||||
|
result = file_status(file_type::character_file);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error_code ec = UTF8ToUTF16(path8,
|
||||||
path_utf16))
|
path_utf16))
|
||||||
return ec;
|
return ec;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user