Fix dos/canonicalize to not extract substrings when the string has the
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 12 Aug 1992 09:16:44 +0000 (09:16 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Wed, 12 Aug 1992 09:16:44 +0000 (09:16 +0000)
proper length.

v7/src/runtime/dospth.scm

index 3f0312524420d09d22ec7c37014d41c4755d1243..fa7a80cdb97a5e7987b9f702666e1704ca2674cc 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/dospth.scm,v 1.9 1992/08/12 08:57:22 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/dospth.scm,v 1.10 1992/08/12 09:16:44 jinx Exp $
 
 Copyright (c) 1992 Massachusetts Institute of Technology
 
@@ -198,8 +198,7 @@ MIT in each case. |#
        (<= (string-length field) length)))
 
   (define (canonicalize-field field length)
-    (if (not (string? field))
-       field
+    (if (valid? field length)
        (substring field 0 length)))
 
   ;; This should really canonicalize the directory as well.