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

Re: extra trailing slash or backslash in path

Expand Messages
  • Dan Sharp
    ... It s a feature. Paths starting with // describe a UNC path, basically meaning a remote server. //home/* means Vim will try to look on the network for a
    Message 1 of 3 , Aug 3, 2004
      Dave Silvia wrote:
      > Curiously, extra directory separators seem to be no problem for glob/expand
      > excepting in the case where the directory is root. Let's say you have a
      > UNIX directory /home and a windows directory c:\home. You can expand either
      > using '/home/*' or '/home//*', but not '//home/*'. Similarly, although
      > '/{dirname}//*' expands just fine, '//*' does not. Also, 'c://*' or 'c:\\*'
      > expand just fine. It's only when the first 2 characters of a path are
      > directory separators that expansion fails.
      >
      > Any ideas on why that is? Feature or bug?

      It's a feature. Paths starting with // describe a UNC path, basically
      meaning a remote server. //home/* means Vim will try to look on the
      network for a machine named 'home' with a share named *. Having a C: in
      front of it allows Vim to recognize it as a local file path and will
      remove the extra / for you.

      Dan Sharp
    • Dave Silvia
      Thank you! I never thought about networking. thx, Dave S. ... From: Dan Sharp [mailto:dwsharp@users.sourceforge.net] Sent: Tuesday, August 03, 2004 7:29 PM
      Message 2 of 3 , Aug 3, 2004
        Thank you! I never thought about networking.

        thx,
        Dave S.
        -----Original Message-----
        From: Dan Sharp [mailto:dwsharp@...]
        Sent: Tuesday, August 03, 2004 7:29 PM
        To: Dave Silvia
        Cc: vim@...
        Subject: Re: extra trailing slash or backslash in path

        Dave Silvia wrote:
        > Curiously, extra directory separators seem to be no problem for
        glob/expand
        > excepting in the case where the directory is root. Let's say you have a
        > UNIX directory /home and a windows directory c:\home. You can expand
        either
        > using '/home/*' or '/home//*', but not '//home/*'. Similarly, although
        > '/{dirname}//*' expands just fine, '//*' does not. Also, 'c://*' or
        'c:\\*'
        > expand just fine. It's only when the first 2 characters of a path are
        > directory separators that expansion fails.
        >
        > Any ideas on why that is? Feature or bug?

        It's a feature. Paths starting with // describe a UNC path, basically
        meaning a remote server. //home/* means Vim will try to look on the
        network for a machine named 'home' with a share named *. Having a C: in
        front of it allows Vim to recognize it as a local file path and will
        remove the extra / for you.

        Dan Sharp
      Your message has been successfully submitted and would be delivered to recipients shortly.