On 8/24/07, Tony Mechelynck <[EMAIL PROTECTED]> wrote: > > Frodak Baksik wrote: > > On 8/24/07, Tony Mechelynck <[EMAIL PROTECTED]> wrote: > >> Sorry if you see this twice: after more than 3 hours I'm not seeing it (nor > >> any reply to it) on the group. > >> > >> Frodak Baksik wrote: > >> [...] > >>> These types of issues have been discussed before on the Cygwin mailing > >>> list. > >>> > >>> Essentially the issue is with win32 vim only using the default file > >>> permissions (i.e. Inherit permissions from parent) when writing the > >>> updated file. For the behavior you desire win32 vim would need to be > >>> updated to track the actual NTFS permissions and restore them when > >>> using :write. > >>> > >>> -- > >>> Frodak > >> Does > >> > >> :set backupcopy > >> > >> improve the results? > >> > >> > >> Best regards, > >> Tony. > >> -- > >> "If you ever want to get anywhere in politics, my boy, you're going to > >> have to get a toehold in the public eye." > >> > > > > I checked that backupcopy=auto. > > > > The issue seems to be with the swap file. If I open a file with win32 > > vim, the swap file gets created with the default permissions. Then > > when I write the file, the backup copy has the original permissions > > but the new file has the default permissions. > > > > When I tried this scenario with Windows Word, its swap file has the > > default permissions, but when the file is saved and word is closed the > > original permissions are retained. I also tried it with notepad, > > wordpad, and visual studio. > > > > Would this be considered a bug with win32 vim on NTFS or is their > > another setting to try? > > > > Thanks, > > Frodak > > Try ":set backupcopy=yes", which is the Unix default and ought to work well in > Cygwin, which is a Unix-like environment. > > This ought to give default permissions to the backup and keep the file's > original permissions intact. If, in addition, you have, for example, > > :set nobackup writebackup > > the backup file won't have a very long lifespan, unless there is a problem. > > > Best regards, > Tony. > -- > Religion has done love a great service by making it a sin. > -- Anatole France > > > >
This did the trick. When win32 vim wrote the file back the original NTFS settings were restored. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
