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

Re: :e foo:bar makes broken swap file foo:.bar.swp. and doesn't removed.

Expand Messages
  • Ken Takata
    Hi, ... I want to explain more detail of the problem. Windows can t use : as a normal filename. : is used for Alternate Data Streams (ADS) on NTFS. E.g.
    Message 1 of 9 , Sep 4, 2013
    • 0 Attachment
      Hi,

      2013/09/05 Thu 12:29:49 UTC+9 mattn wrote:
      > Sorry, It happen on windows just only. It's sub-stream feature on windows. And I notice my patch is wrong. it doesn't fix issue.
      >
      > I'll try to fix again.

      I want to explain more detail of the problem.
      Windows can't use ':' as a normal filename. ':' is used for "Alternate Data
      Streams (ADS)" on NTFS.
      E.g. "foo:bar" is an ADS named "bar" which belongs to a normal file "foo".

      When edit an ADS "foo:bar", currently a swapfile "foo:.bar" will be
      created, which means that a normal file "foo" will also be created
      automatically even we don't save the ADS "foo:bar". After quiting vim
      without saving "foo:bar", the file "foo" remains.

      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.
    • mattn
      I updated patch https://gist.github.com/mattn/6444548 -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the
      Message 2 of 9 , Sep 4, 2013
      • 0 Attachment
        I updated patch

        https://gist.github.com/mattn/6444548

        --
        --
        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
        ... About this part: +#ifdef WIN3264 + if (buf- b_fname != NULL && !mch_isFullName(buf- b_fname)) + { + char *t; + buf_fname = (char
        Message 3 of 9 , Sep 5, 2013
        • 0 Attachment
          Yasuhiro Matsumoto wrote:

          > I updated patch
          >
          > https://gist.github.com/mattn/6444548

          About this part:

          +#ifdef WIN3264
          + if (buf->b_fname != NULL && !mch_isFullName(buf->b_fname))
          + {
          + char *t;
          + buf_fname = (char *)vim_strsave(buf->b_fname);
          + for (t = gettail(buf_fname); *t != NUL; mb_ptr_adv(t))
          + if (*t == ':')
          + *t = '%';
          + }
          +
          +#endif

          It would be better to only make a copy of the file name when needed,
          thus first check if there is a colon. That avoids the copy in most
          cases.

          --
          "Hit any key to continue" is a lie.

          /// 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.
        • mattn
          ... Thanks for your review. I updated patch: https://gist.github.com/mattn/6444548 I found another problem that couldn t treat UNC paths with my patch. The
          Message 4 of 9 , Sep 9, 2013
          • 0 Attachment
            On Thursday, September 5, 2013 7:06:52 PM UTC+9, Bram Moolenaar wrote:
            > It would be better to only make a copy of the file name when needed,
            > thus first check if there is a colon. That avoids the copy in most
            > cases.

            Thanks for your review.
            I updated patch:

            https://gist.github.com/mattn/6444548

            I found another problem that couldn't treat UNC paths with my patch. The patch contains fixes of it.

            --
            --
            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, it s in the todo list. -- hundred-and-one symptoms of being an internet addict: 195. Your cat has its own home page. /// Bram Moolenaar --
            Message 5 of 9 , Sep 9, 2013
            • 0 Attachment
              Yasuhiro Matsumoto wrote:

              > On Thursday, September 5, 2013 7:06:52 PM UTC+9, Bram Moolenaar wrote:
              > > It would be better to only make a copy of the file name when needed,
              > > thus first check if there is a colon. That avoids the copy in most
              > > cases.
              >
              > Thanks for your review.
              > I updated patch:
              >
              > https://gist.github.com/mattn/6444548
              >
              > I found another problem that couldn't treat UNC paths with my patch.
              > The patch contains fixes of it.

              Thanks, it's in the todo list.

              --
              hundred-and-one symptoms of being an internet addict:
              195. Your cat has its own home page.

              /// 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.
            Your message has been successfully submitted and would be delivered to recipients shortly.