Retain xattr / Extended file attributes on save
Problem
xattrs are lost on save.
Suggested solution / Expected behavior
Retain the xattrs (if they exist) when saving a file.
Actual behavior
$ echo text > test.txt
$ cat test.txt
text
$ setfattr -n user.tags -v "my|tag|list" test.txt
$ getfattr --dump test.txt
# file: test.txt
user.tags="my|tag|list"
$ mousepad test.txt
$ cat test.txt
text
new line
$ getfattr --dump test.txt
When I called mousepad I made changes to the file (I've added a new line) and saved it. Now my precious xattrs are gone. :(
Note: When I extend the file via echo more text >> test.txt
the attributes are retained. That's why I think it is something to be changed in mousepad.