瀏覽代碼

Fix xattr on OS X

Jonas Borgström 12 年之前
父節點
當前提交
f049b3d4c7
共有 1 個文件被更改,包括 0 次插入3 次删除
  1. 0 3
      attic/xattr.py

+ 0 - 3
attic/xattr.py

@@ -138,13 +138,10 @@ except ImportError:
             flags = 0
             flags = 0
             if isinstance(path, str):
             if isinstance(path, str):
                 path = os.fsencode(path)
                 path = os.fsencode(path)
-                func = libc.fgetxattr
             if isinstance(path, int):
             if isinstance(path, int):
                 func = libc.fgetxattr
                 func = libc.fgetxattr
             elif not follow_symlinks:
             elif not follow_symlinks:
                 flags = XATTR_NOFOLLOW
                 flags = XATTR_NOFOLLOW
-            else:
-                func = libc.lgetxattr
             n = _check(func(path, name, None, 0, 0, flags))
             n = _check(func(path, name, None, 0, 0, flags))
             if n == 0:
             if n == 0:
                 return
                 return