raco setup: clean up "library" installs that are directories

This commit is contained in:
Matthew Flatt 2014-06-04 10:11:42 +01:00
parent 4b5c907440
commit 15214b9983

View File

@ -1654,10 +1654,11 @@
[else
;; remove the lib
(define lib-path (build-dest-path target-dir (bytes->path-element k)))
(when (file-exists? lib-path)
(when (or (file-exists? lib-path)
(directory-exists? lib-path))
(setup-printf "deleting" (string-append what " ~a")
(path->relative-string/* lib-path))
(delete-file lib-path))
(delete-directory/files lib-path))
ht])))
(unless (equal? ht ht2)
(setup-printf "updating" (format "~a list" what))