From: Chris Hanson Date: Fri, 10 Nov 1995 23:48:51 +0000 (+0000) Subject: Assume that FILE-TIME->STRING will return a plausible string under all X-Git-Tag: 20090517-FFI~5746 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=50b2ef9ab25126989f61d0cdeb78d07a3ba84fa0;p=mit-scheme.git Assume that FILE-TIME->STRING will return a plausible string under all circumstances. --- diff --git a/v7/src/edwin/dos.scm b/v7/src/edwin/dos.scm index 95360d957..fcaccb5bd 100644 --- a/v7/src/edwin/dos.scm +++ b/v7/src/edwin/dos.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: dos.scm,v 1.31 1995/10/31 09:06:39 cph Exp $ +;;; $Id: dos.scm,v 1.32 1995/11/10 23:48:51 cph Exp $ ;;; ;;; Copyright (c) 1992-95 Massachusetts Institute of Technology ;;; @@ -155,13 +155,11 @@ ;; Swap year around to the start (let ((time-string (file-time->string (file-attributes/modification-time attr)))) - (if (string? time-string) - (or (let ((len (string-length time-string))) - (and (fix:> len 5) ;; Grab the space char as well - (string-append (substring time-string (fix:- len 5) len) - " " - (substring time-string 0 (fix:- len 5))))) - "")))) + ;; Move the year from end to start, carrying leading space. + (let ((index (fix:- (string-length time-string) 5))) + (string-append (string-tail time-string index) + " " + (string-head time-string index))))) (let ((name (file-namestring file)) (attr (or (file-attributes file) (dummy-file-attributes))))