mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 19:26:30 +00:00
Determine absolute paths the correct way :)
llvm-svn: 35464
This commit is contained in:
parent
d0eb672f1e
commit
6e6a8a9128
@ -107,9 +107,15 @@ Path::isValid() const {
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
Path::isAbsolute() const {
|
Path::isAbsolute() const {
|
||||||
if (path.length() < 3)
|
switch (path.length()) {
|
||||||
return false;
|
case 0:
|
||||||
return path[0] == 'C' && path[1] == ':' && path[2] == '\\';
|
return false;
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
return path[0] == '/';
|
||||||
|
default:
|
||||||
|
return path[0] == '/' || (path[1] == ':' && path[2] == '/');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Path *TempDirectory = NULL;
|
static Path *TempDirectory = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user