Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | shutils should consider symlinks |
| 2 | |
| 3 | -Khem |
| 4 | |
| 5 | Upstream-Status: Pending |
| 6 | |
| 7 | --- a/Lib/shutil.py 2013-01-29 12:31:06.926555779 -0800 |
| 8 | +++ b/Lib/shutil.py 2013-01-29 16:31:39.097554182 -0800 |
| 9 | @@ -132,7 +132,7 @@ def copymode(src, dst, *, follow_symlink |
| 10 | st = stat_func(src) |
| 11 | chmod_func(dst, stat.S_IMODE(st.st_mode)) |
| 12 | |
| 13 | -if hasattr(os, 'listxattr'): |
| 14 | +if hasattr(os, 'listxattr') and os.listxattr in os.supports_follow_symlinks: |
| 15 | def _copyxattr(src, dst, *, follow_symlinks=True): |
| 16 | """Copy extended filesystem attributes from `src` to `dst`. |
| 17 | |