summaryrefslogtreecommitdiff
path: root/lib/System/Unix/Path.inc
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-12 19:01:16 +0000
committerChris Lattner <sabre@nondot.org>2009-07-12 19:01:16 +0000
commit0f55014430b92e3859aef60e0e4772364b232840 (patch)
treec22ca6e4d78f419af1652c2d3ff7f26c7aa7d463 /lib/System/Unix/Path.inc
parentc8ca3ae27b64fa785f944799a9bc133fac8f90d9 (diff)
downloadllvm-0f55014430b92e3859aef60e0e4772364b232840.tar.gz
llvm-0f55014430b92e3859aef60e0e4772364b232840.tar.bz2
llvm-0f55014430b92e3859aef60e0e4772364b232840.tar.xz
"UNIX paths can contain non-ASCII characters, so Path::isValid() should not reject paths with such characters in them. The attached patch removes the check from Path::isValid()."
patch by Benjamin Kramer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix/Path.inc')
-rw-r--r--lib/System/Unix/Path.inc10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc
index 1f73571cf1..125a0ab209 100644
--- a/lib/System/Unix/Path.inc
+++ b/lib/System/Unix/Path.inc
@@ -92,15 +92,7 @@ Path::isValid() const {
// Check some obvious things
if (path.empty())
return false;
- else if (path.length() >= MAXPATHLEN)
- return false;
-
- // Check that the characters are ascii chars
- size_t len = path.length();
- unsigned i = 0;
- while (i < len && isascii(path[i]))
- ++i;
- return i >= len;
+ return path.length() < MAXPATHLEN;
}
bool