summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/macpath.py5
-rw-r--r--Misc/NEWS2
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index f58a195..3b3e4ff 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -193,7 +193,10 @@ def realpath(path):
path = components[0] + colon
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
diff --git a/Misc/NEWS b/Misc/NEWS
index 7c8c711..e85ab00 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -285,6 +285,8 @@ C-API
Library
-------
+- Issue #8179: Fix macpath.realpath() on a non-existing path.
+
- Issue #8024: Update the Unicode database to 5.2.
- Issue #8168: py_compile now handles files with utf-8 BOMS.