emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy-directory


From: Michael Albinus
Subject: Re: copy-directory
Date: Sun, 04 Oct 2009 22:02:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Please don't rely on the `chown' command being available for the
>> preserve-uid-gid option.
>
> Especially since chown only works for root anyway, and since I don't
> think we should cater specially for root-uses of Emacs (I rather
> discourage the use of Emacs when running as root), I'd rather we don't
> touch the uid.

I've tried to be as close as possible to `copy-file'. There is the code

#ifndef MSDOS
  /* Preserve the original file modes, and if requested, also its
     owner and group.  */
  if (input_file_statable_p)
    {
      if (! NILP (preserve_uid_gid))
        fchown (ofd, st.st_uid, st.st_gid);
      fchmod (ofd, st.st_mode & 07777);
    }
#endif  /* not MSDOS */

Shall we add a subroutine function for this, as proposed by Eli? Or
shall we remove PRESERVE-UID-GID from `copy-directory'?

>         Stefan

Best regards, Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]