cannot set attributes on symlink
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-xattr (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
xattr seems to read attributes from symlinks, but always set them on the underlying file. Here's an example by way of a shell session:
$ cd /tmp
$ touch target
$ ln -s target source
$ python -i
>>> import xattr
>>> symlink = xattr.xattr(
>>> underlying_file = xattr.xattr(
>>> symlink[
# now we should have an attribute on the symlink itself, and nothing on the underlying file. But the opposite is true:
>>> symlink[
-------
KeyError Traceback (most recent call last)
/usr/lib/
131 return self.get(item)
132 except IOError:
--> 133 raise KeyError(item)
134
135 def iterkeys(self):
KeyError: 'user.test_xattr'
>>> underlying_
'1'
Changed in python-xattr (Ubuntu): | |
importance: | Undecided → Medium |
Changed in python-xattr (Ubuntu): | |
status: | New → Triaged |
I've fixed the issue in a guthub fork, below:
https:/ /github. com/xattr/ xattr/pull/ 4