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
  • mattn
    ... 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. --
    Message 1 of 9 , Sep 4, 2013
    • 0 Attachment
      On Thursday, September 5, 2013 11:05:47 AM UTC+9, Tony Mechelynck wrote:
      > On 05/09/13 02:40, mattn wrote:
      >
      > > Hi.
      >
      > >
      >
      > > :e foo:bar
      >
      > > :set swapfile
      >
      > > :swapname
      >
      > > foo:.bar.swp
      >
      > >
      >
      > > This swapfile name should be .foo%bar.swp
      >
      > >
      >
      > > https://gist.github.com/6444548
      >
      > >
      >
      > On which OS are you running? On Unix and Mac OS X the path separator is
      >
      > a forward slash, on Windows it is a backslash (except a colon can be use
      >
      > after a single letter at the start). The above data makes it seem that
      >
      > on your system the colon is a path separator which can be used after a
      >
      > prefix of more than one letter. What system is that? Amiga? RISC-OS? VMS?
      >
      >
      >
      >
      >
      > best regards,
      >
      > Tony.
      >
      > --
      >
      > <hop> when you start making only stupid mistakes that are obvious, thats
      >
      > when you start getting competent
      >
      > <hop> because you don't make fundamental misunderstanding mistakes
      >
      > <hop> and thats a *good* sign.

      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.

      --
      --
      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 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 2 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 3 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 4 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 5 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 6 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.