ashersyed / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Extended attributes get deleted #498

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a new file:
    touch test.txt

2. Set a custom extended attribute:
    xattr -w test "what is this" test.txt

3. Check extended attributes:

    xattr -l test.txt
    > test: what is this

4. Open file in MacVim, press save

5. Check that extended attributes are gone

    xattr -l test.txt

What is the expected output? What do you see instead?

I don't expect MacVim to lose the extended attributes.

What version of MacVim and OS X are you using (see "MacVim->About MacVim"
and  "Apple Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6
Intel")?

I tried with the latest snapshot and with Snapshot 66.

Please provide any additional information below.

I'm happy to help fix this, if anybody has any pointers. The issue doesn't 
apply in normal vim, btw.

Original issue reported on code.google.com by chriseid...@eidhof.nl on 21 Mar 2014 at 12:52

GoogleCodeExporter commented 9 years ago
This sounds like a known problem caused by one of the 'backup' options.  If I 
remember correctly you should be able to ":set backupcopy=no" and then 
attributes won't get deleted.

Not sure why it doesn't happen in normal vim though...

Original comment by bjorn.winckler@gmail.com on 24 Mar 2014 at 6:51

GoogleCodeExporter commented 9 years ago
In case it helps, I can reproduce this with Vim 7.4.430 under Linux/amd64.  I 
lose all extended attributes (set with setfattr) as soon as I modify the file 
with Vim.  setting backupcopy=no during an edit session had no effect.

Original comment by vphan...@gmail.com on 20 Sep 2014 at 6:24

GoogleCodeExporter commented 9 years ago
Update: the actual solution is ":set backupcopy=yes" instead of the default 
"auto".  Explanation: http://edeca.net/wp/2009/08/vim-vs-linux-extended-acls/ :)

Original comment by vphan...@gmail.com on 20 Sep 2014 at 6:28