"UNIX paths can contain non-ASCII characters, so Path::isValid() should not reject...
authorChris Lattner <sabre@nondot.org>
Sun, 12 Jul 2009 19:01:16 +0000 (19:01 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 12 Jul 2009 19:01:16 +0000 (19:01 +0000)
patch by Benjamin Kramer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75421 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Unix/Path.inc

index 1f73571cf140ba350d6efd80735d6169f774b6eb..125a0ab209ca1397d693c2e434cc633f80209607 100644 (file)
@@ -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