Mercurial > vim
comparison src/undo.c @ 6771:63b2bc619d5a v7.4.707
patch 7.4.707
Problem: Undo files can have their executable bit set.
Solution: Strip of the executable bit. (Mikael Berthe)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 21 Apr 2015 16:12:06 +0200 |
parents | 290631797b76 |
children | 0b6c37dd858d |
comparison
equal
deleted
inserted
replaced
6770:81df4c7d2bc2 | 6771:63b2bc619d5a |
---|---|
1612 if (perm < 0) | 1612 if (perm < 0) |
1613 perm = 0600; | 1613 perm = 0600; |
1614 #endif | 1614 #endif |
1615 } | 1615 } |
1616 | 1616 |
1617 /* strip any s-bit */ | 1617 /* strip any s-bit and executable bit */ |
1618 perm = perm & 0777; | 1618 perm = perm & 0666; |
1619 | 1619 |
1620 /* If the undo file already exists, verify that it actually is an undo | 1620 /* If the undo file already exists, verify that it actually is an undo |
1621 * file, and delete it. */ | 1621 * file, and delete it. */ |
1622 if (mch_getperm(file_name) >= 0) | 1622 if (mch_getperm(file_name) >= 0) |
1623 { | 1623 { |