def resolve_alias(path): """Resolves a path to point to the real file if it is a file system alias. """ try: fs, _, _ = FSResolveAliasFile(path, 1) return fsdec(fs.as_pathname()) except (OSError, MacOS.Error) as ose: pout(u"Failed to resolve alias for %s." % (path)) return path
def resolve_alias(path): """Resolves a path to point to the real file if it is a file system alias. """ fs, _, _ = FSResolveAliasFile(path, 1) return su.fsdec(fs.as_pathname())