🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #1900

Fix to chown in dired.el

#1900
From: Kimmo Suominen
Date: Tue, 27 Feb 1990 23:57
38 lines
1902 bytes
I like using dired, but recently I ran into a difference between HP-UX and BSD
which wasn't noticed in dired.el.  The program chown is hard-coded in lisp as
/etc/chown, which is correct in BSD Unix (or at least SunOS).  In HP-UX (and
possibly other SysV's) the program is /bin/chown.

The following patch is for version 18.55 of GNU Emacs and it only takes hpux
in account.

*** lisp/dired.el~
--- lisp/dired.el
**************
*** 537,543
    (interactive "sChange to Owner: ")
    (let ((buffer-read-only nil)
  	(file (dired-get-filename)))
!     (call-process "/etc/chown" nil nil nil owner file)
      (dired-redisplay file)))
  
  (defun dired-redisplay (file) "Redisplay this line."
--- 537,545 -----
    (interactive "sChange to Owner: ")
    (let ((buffer-read-only nil)
  	(file (dired-get-filename)))
!     (if (eq system-type 'hpux)
! 	(call-process "/bin/chown" nil nil nil owner file)
!       (call-process "/etc/chown" nil nil nil owner file))
      (dired-redisplay file)))
  
  (defun dired-redisplay (file) "Redisplay this line."

Use and possibly incorporate into future releases.

Kim
--
 ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
( Kimmo Suominen        ! Lappeenranta U of Technology ! kim@kannel.lut.fi )
( "That's what I think" ! Computing Centre  *  Finland ! Funet: KUULA::KIM )
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Technical Details
Message-ID: <KIM.90Feb27185704@kannel.lut.fi>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!sunic!tut!kannel!kim

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!sunic!tut!kannel!kim
From: kim@kannel.lut.fi (Kimmo Suominen)
Newsgroups: gnu.emacs.bug
Subject: Fix to chown in dired.el
Message-ID: <KIM.90Feb27185704@kannel.lut.fi>
Date: 27 Feb 90 23:57:04 GMT
Sender: kim@kannel.lut.fi
Distribution: gnu
Organization: Lappeenranta University of Technology, Finland
Lines: 38
Disclaimer: These are my opinions unless otherwise stated