From 3c69bcb1ca082d07442f6f7f1df4787499c33298 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 25 Apr 1989 02:03:23 +0000 Subject: [PATCH] `os/make-dired-line' now returns #F if it is unable to get the file's attributes. --- v7/src/edwin/unix.scm | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/v7/src/edwin/unix.scm b/v7/src/edwin/unix.scm index 24c9059ca..e66358c3c 100644 --- a/v7/src/edwin/unix.scm +++ b/v7/src/edwin/unix.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/unix.scm,v 1.4 1989/04/20 08:19:38 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/unix.scm,v 1.5 1989/04/25 02:03:23 cph Exp $ ;;; ;;; Copyright (c) 1989 Massachusetts Institute of Technology ;;; @@ -180,31 +180,31 @@ Includes the new backup. Must be > 0" (define (os/make-dired-line pathname) (let ((attributes (file-attributes pathname))) - (string-append " " - (file-attributes/mode-string attributes) - " " - (pad-on-left-to - (number->string (file-attributes/n-links attributes) 10) - 3) - " " - (pad-on-right-to - (unix/uid->string (file-attributes/uid attributes)) - 8) - " " - (pad-on-right-to - (unix/gid->string (file-attributes/gid attributes)) - 8) - " " - (pad-on-left-to - (number->string (file-attributes/length attributes) 10) - 7) - " " - (substring (unix/file-time->string - (file-attributes/modification-time attributes)) - 4 - 16) - " " - (pathname-name-string pathname)))) + (and attributes + (string-append + " " + (file-attributes/mode-string attributes) + " " + (pad-on-left-to + (number->string (file-attributes/n-links attributes) 10) + 3) + " " + (pad-on-right-to (unix/uid->string (file-attributes/uid attributes)) + 8) + " " + (pad-on-right-to (unix/gid->string (file-attributes/gid attributes)) + 8) + " " + (pad-on-left-to + (number->string (file-attributes/length attributes) 10) + 7) + " " + (substring (unix/file-time->string + (file-attributes/modification-time attributes)) + 4 + 16) + " " + (pathname-name-string pathname))))) (define (os/dired-filename-region lstart) (let ((lend (line-end lstart 0))) -- 2.25.1