summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/builder.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 23a1c2ca..ed21f623 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -138,7 +138,9 @@ class Factory(object):
for dirname, subdirs, basenames in os.walk(root, topdown=False):
for basename in basenames:
pathname = os.path.join(dirname, basename)
- os.utime(pathname, (now, now))
+ # we need the following check to ignore broken symlinks
+ if os.path.exists(pathname):
+ os.utime(pathname, (now, now))
os.utime(dirname, (now, now))