[plt-scheme] Filename-extension bug in hidden dirs?
On 25/05/06, Eli Barzilay <eli at barzilay.org> wrote:
> On May 25, Paulo J. Matos wrote:
> > On 25/05/06, Danny Yoo <dyoo at hkn.eecs.berkeley.edu> wrote:
> > >
> > >
> > > On Thu, 25 May 2006, Paulo J. Matos wrote:
> > >
> > >
> > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > > (module fixed-filename-extension mzscheme
> > > (provide filename-extension)
> > > (define filename-extension
> > > (lambda (name)
> > > (unless (path-string? name)
> > > (raise-type-error 'filename-extension "path or string" name))
> > > (let-values ([(base name must-be-dir?)
> > > (split-path name)])
> > > (and (not must-be-dir?)
> > > (let ([m (regexp-match #rx#"[.]([^.]+)$"
> > > (path->bytes name))])
> > > (and m
> > > (cadr m))))))))
> > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > >
> > >
> >
> > Thanks for the code snippet. :)
>
> You can update your .../mzlib directory and you'll get a fixed copy.
>
Lovely! :)
> --
> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
> http://www.barzilay.org/ Maze is Life!
>
--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group