Loading ...
Sorry, an error occurred while loading the content.
 

Re: Accidental filename case conversion on Cygwin

Expand Messages
  • Bram Moolenaar
    ... As you mentioned later, this isn t new in 6.4, it s the same as in 6.3. A workaround is to set the backupcopy option to yes . Then at least the file
    Message 1 of 19 , Nov 19 8:39 AM
      Corinna Vinschen wrote:

      > I got reports on the Cygwin list, that the new vim 6.4 would accidentally
      > change the case of filenames, if the filename case was different when
      > loading the file. Well, that sounds complicated... just try this:
      >
      > $ touch X.sh
      > $ ls
      > X.sh
      > $ vim x.sh
      > :w
      > :x
      > $ ls
      > x.sh
      >
      > With vim 6.3, the case was still correct afterwards. How can this be
      > fixed?

      As you mentioned later, this isn't new in 6.4, it's the same as in 6.3.

      A workaround is to set the 'backupcopy' option to "yes". Then at least
      the file name won't change. The backup may have different case though.

      As Vim was originally made for the Amiga, which also has a
      case-preserving file system, code in Vim is present to handle the
      situation. I'll see if it can be enabled for Unix builds for Mac OS/X
      and Cygwin.

      --
      hundred-and-one symptoms of being an internet addict:
      97. Your mother tells you to remember something, and you look for
      a File/Save command.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
    • Corinna Vinschen
      Hi Bram, ... Sounds good. While I m sure it s lowest priority for other Unix based OSes, I m still wondering if that wouldn t also make sense for Linux and
      Message 2 of 19 , Nov 19 9:04 AM
        Hi Bram,

        On Nov 19 17:39, Bram Moolenaar wrote:
        >
        > Corinna Vinschen wrote:
        >
        > > I got reports on the Cygwin list, that the new vim 6.4 would accidentally
        > > change the case of filenames, if the filename case was different when
        > > loading the file. Well, that sounds complicated... just try this:
        > >
        > > $ touch X.sh
        > > $ ls
        > > X.sh
        > > $ vim x.sh
        > > :w
        > > :x
        > > $ ls
        > > x.sh
        > >
        > > With vim 6.3, the case was still correct afterwards. How can this be
        > > fixed?
        >
        > As you mentioned later, this isn't new in 6.4, it's the same as in 6.3.
        >
        > A workaround is to set the 'backupcopy' option to "yes". Then at least
        > the file name won't change. The backup may have different case though.
        >
        > As Vim was originally made for the Amiga, which also has a
        > case-preserving file system, code in Vim is present to handle the
        > situation. I'll see if it can be enabled for Unix builds for Mac OS/X
        > and Cygwin.

        Sounds good. While I'm sure it's lowest priority for other Unix based
        OSes, I'm still wondering if that wouldn't also make sense for Linux
        and other OSes, which have drivers for FAT/NTFS/HPFS, etc?


        Corinna

        --
        Corinna Vinschen
        Cygwin Project Co-Leader
        Red Hat, Inc.
      Your message has been successfully submitted and would be delivered to recipients shortly.