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

[patch] Win32: Can't cd to a symlink of a directory

Expand Messages
  • Ken Takata
    If Vim is build by VC10, it can t cd to a symlink of a directory. ... E344: Can t find directory symlink in cdpath E472: Command failed This is caused by a
    Message 1 of 3 , Sep 20, 2013
    • 0 Attachment
      If Vim is build by VC10, it can't cd to a symlink of a directory.

      E.g.:

      >md foo
      >mklink /d symlink foo
      >gvim
      :cd symlink

      E344: Can't find directory "symlink" in cdpath
      E472: Command failed

      This is caused by a bug(?) of VC10's stat(). VC's stat() behaves as follows:

      VC8 or earlier: stat() doesn't support symlinks at all. It retrieves status
      of a symlink itself.
      VC10: stat() supports a symlink to a normal file, but it doesn't support a
      symlink to a directory. It always returns an error for a symlink to a
      directory.
      VC11: stat() supports both types of symlinks. It retrieves status of a target.
      (I don't know about VC9.)

      Attached patch fixes this problem and makes vim_stat() to behave as the same
      as VC11's stat().

      Regards,
      Ken Takata

      --
      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Bram Moolenaar
      ... Thanks, I ll add it in the todo list. -- hundred-and-one symptoms of being an internet addict: 244. You use more than 20 passwords. /// Bram Moolenaar --
      Message 2 of 3 , Sep 21, 2013
      • 0 Attachment
        Ken Takata wrote:

        > If Vim is build by VC10, it can't cd to a symlink of a directory.
        >
        > E.g.:
        >
        > >md foo
        > >mklink /d symlink foo
        > >gvim
        > :cd symlink
        >
        > E344: Can't find directory "symlink" in cdpath
        > E472: Command failed
        >
        > This is caused by a bug(?) of VC10's stat(). VC's stat() behaves as follows:
        >
        > VC8 or earlier: stat() doesn't support symlinks at all. It retrieves status
        > of a symlink itself.
        > VC10: stat() supports a symlink to a normal file, but it doesn't support a
        > symlink to a directory. It always returns an error for a symlink to a
        > directory.
        > VC11: stat() supports both types of symlinks. It retrieves status of a target.
        > (I don't know about VC9.)
        >
        > Attached patch fixes this problem and makes vim_stat() to behave as the same
        > as VC11's stat().

        Thanks, I'll add it in the todo list.

        --
        hundred-and-one symptoms of being an internet addict:
        244. You use more than 20 passwords.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Ken Takata
        Hi, ... I checked the behavior of VC9 s stat(). It was the same as VC8. I have updated comments in my patch. # If the comments are still wrong (including
        Message 3 of 3 , Sep 21, 2013
        • 0 Attachment
          Hi,

          2013/09/21 Sat 7:30:14 UTC+9 Ken Takata wrote:

          > This is caused by a bug(?) of VC10's stat(). VC's stat() behaves as follows:
          >
          > VC8 or earlier: stat() doesn't support symlinks at all. It retrieves status
          > of a symlink itself.
          > VC10: stat() supports a symlink to a normal file, but it doesn't support a
          > symlink to a directory. It always returns an error for a symlink to a
          > directory.
          > VC11: stat() supports both types of symlinks. It retrieves status of a target.
          > (I don't know about VC9.)

          I checked the behavior of VC9's stat(). It was the same as VC8.
          I have updated comments in my patch.
          # If the comments are still wrong (including English), please fix them.

          Regards,
          Ken Takata

          --
          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.