~ chicken-core (chicken-5) 91cc29dfe22f1bded11fa4fec0389857df7b26d0
commit 91cc29dfe22f1bded11fa4fec0389857df7b26d0
Author: Christian Kellermann <ckeen@pestilenz.org>
AuthorDate: Mon Oct 1 17:35:30 2012 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Mon Oct 1 19:53:18 2012 +0200
Prevent running applications from crashing when reinstalling eggs
As suggested by Jim Ursetto this removes any previously installed
files before installing ones by the same name. Fixes Bug #929.
Amended by felix to use "shellpath".
Signed-off-by: felix <felix@call-with-current-continuation.org>
diff --git a/setup-api.scm b/setup-api.scm
index 50ab4842..cf9d8a1e 100644
--- a/setup-api.scm
+++ b/setup-api.scm
@@ -509,6 +509,8 @@
(directory from)))
(else
(ensure-directory to)
+ (when (file-exists? to)
+ (run (,*remove-command* ,to)))
(run (,*copy-command*
,(shellpath from)
,(shellpath to))))))
Trap