Issue #8179: Fix macpath.realpath() on a non-existing path.
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 15714c6..b22759e 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -206,7 +206,10 @@
     path = components[0] + ':'
     for c in components[1:]:
         path = join(path, c)
-        path = Carbon.File.FSResolveAliasFile(path, 1)[0].as_pathname()
+        try:
+            path = Carbon.File.FSResolveAliasFile(path, 1)[0].as_pathname()
+        except Carbon.File.Error:
+            pass
     return path
 
 supports_unicode_filenames = False