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

73111Re: "Not reading undo file, owner differs" if the edited file belongs to another user

Expand Messages
  • cac2s
    Sep 8 2:29 AM
    • 0 Attachment
      > Try this patch:
      >
      > *** ../vim-7.4.022/src/undo.c 2013-06-10 20:13:37.000000000 +0200
      > --- src/undo.c 2013-09-07 15:45:56.000000000 +0200
      > ***************
      > *** 1604,1613 ****
      >
      > #ifdef UNIX
      > /* For safety we only read an undo file if the owner is equal to the
      > ! * owner of the text file. */
      > if (mch_stat((char *)orig_name, &st_orig) >= 0
      > && mch_stat((char *)file_name, &st_undo) >= 0
      > ! && st_orig.st_uid != st_undo.st_uid)
      > {
      > if (p_verbose > 0)
      > {
      > --- 1604,1614 ----
      >
      > #ifdef UNIX
      > /* For safety we only read an undo file if the owner is equal to the
      > ! * owner of the text file or equal to the current user. */
      > if (mch_stat((char *)orig_name, &st_orig) >= 0
      > && mch_stat((char *)file_name, &st_undo) >= 0
      > ! && st_orig.st_uid != st_undo.st_uid
      > ! && st_undo.st_uid != getuid())
      > {
      > if (p_verbose > 0)
      > {


      I rebuilt vim 7.3.547.7 (debian wheezy) with this patch.

      Now the undo files are opened just as they should. Thank you!

      --
      --
      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.
    • Show all 11 messages in this topic