From e54a49f4ce1779980e70115ba3450fa783f0238a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 12 May 2006 22:04:54 +0000 Subject: [PATCH] bad ext path could confuse cm.ss svn: r2926 --- collects/mzlib/cm.ss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/collects/mzlib/cm.ss b/collects/mzlib/cm.ss index ecaa6c3c74..6e3b3a8d3d 100644 --- a/collects/mzlib/cm.ss +++ b/collects/mzlib/cm.ss @@ -245,11 +245,16 @@ (let ([t (cond [(bytes? d) (compile-root mode (bytes->path d) up-to-date)] [(path? d) (compile-root mode d up-to-date)] - [(and (pair? d) (eq? (car d) 'ext)) + [(and (pair? d) + (eq? (car d) 'ext) + (or (bytes? (cdr d)) + (path? (cdr d)))) (with-handlers ((exn:fail:filesystem? (lambda (ex) +inf.0))) - (file-or-directory-modify-seconds (cdr d)))] - [else -inf.0])]) + (file-or-directory-modify-seconds (if (bytes? (cdr d)) + (bytes->path (cdr d)) + (cdr d))))] + [else +inf.0])]) (when (> t path-zo-time) (trace-printf "newer: ~a (~a > ~a)..." d t path-zo-time)) (> t path-zo-time)))