>From 57c6ed1ab0a69c2ee766ac3efc759e901b4b57bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= <daniel@turtleware.eu>
Date: Fri, 9 Sep 2016 15:16:14 +0200
Subject: [PATCH 7/9] bundle: make-build: be smart on move-here

This is a conveniance mechanism to avoid problems with cross-device
links.
---
 bundle.lisp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bundle.lisp b/bundle.lisp
index ad6dd51..e1743f0 100644
--- a/bundle.lisp
+++ b/bundle.lisp
@@ -348,7 +348,10 @@ for all the linkable object files associated with the system or its dependencies
                 :for new-f = (make-pathname :name (pathname-name f)
                                             :type (pathname-type f)
                                             :defaults dest-path)
-                :do (rename-file-overwriting-target f new-f)
+                :do (handler-case (rename-file-overwriting-target f new-f)
+                      (file-error (c)
+                        (copy-file f new-f)
+                        (delete-file-if-exists f)))
                 :collect new-f)
           files))))
 
-- 
2.9.3

