Raymond Toy pushed to branch issue-130-file-author-in-c at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/filesys.lisp
    ... ... @@ -1061,29 +1061,6 @@ optionally keeping some of the most recent old versions."
    1061 1061
     
    
    1062 1062
     ;;; File-Author  --  Public
    
    1063 1063
     ;;;
    
    1064
    -#+nil
    
    1065
    -(defun file-author (file)
    
    1066
    -  "Returns the file author as a string, or nil if the author cannot be
    
    1067
    - determined.  Signals an error of type file-error if file doesn't exist,
    
    1068
    - or file is a wild pathname."
    
    1069
    -  (if (wild-pathname-p file)
    
    1070
    -      (error 'simple-file-error
    
    1071
    -	     :pathname file
    
    1072
    -	     :format-control (intl:gettext "Bad place for a wild pathname."))
    
    1073
    -      (let ((name (unix-namestring (merge-pathnames file) t)))
    
    1074
    -	(unless name
    
    1075
    -	  (error 'simple-file-error
    
    1076
    -		 :pathname file
    
    1077
    -		 :format-control (intl:gettext "~S doesn't exist.")
    
    1078
    -		 :format-arguments (list file)))
    
    1079
    -	(multiple-value-bind (winp dev ino mode nlink uid)
    
    1080
    -			     (unix:unix-stat name)
    
    1081
    -	  (declare (ignore dev ino mode nlink))
    
    1082
    -	  (when winp
    
    1083
    -            (let ((user-info (unix:unix-getpwuid uid)))
    
    1084
    -              (when user-info
    
    1085
    -                (unix:user-info-name user-info))))))))
    
    1086
    -
    
    1087 1064
     (defun file-author (file)
    
    1088 1065
       "Returns the file author as a string, or nil if the author cannot be
    
    1089 1066
      determined.  Signals an error of type file-error if file doesn't exist,