You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 08:09:30 UTC

[buildstream] 22/43: hack: remove files which previously blocked directory creation

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch jmac/cas_to_cas_oct_v2
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 14623feb9c455754853b39c218b19233a31dd57a
Author: Jim MacArthur <ji...@codethink.co.uk>
AuthorDate: Thu Oct 25 15:12:05 2018 +0100

    hack: remove files which previously blocked directory creation
---
 buildstream/storage/_casbaseddirectory.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream/storage/_casbaseddirectory.py
index d00cdd6..3388cfc 100644
--- a/buildstream/storage/_casbaseddirectory.py
+++ b/buildstream/storage/_casbaseddirectory.py
@@ -454,7 +454,10 @@ class CasBasedDirectory(Directory):
                             directory = directory.descend(c, create=True)
                         elif components:
                             # Oh dear. We have components left to resolve, but the one we're trying to resolve points to a file.
-                            raise VirtualDirectoryError("Reached a file called {} while trying to resolve a symlink; cannot proceed".format(c))
+                            print("Trying to resolve {}, but found {} was a file.".format(symlink.target, c))
+                            self.delete_entry(c)
+                            directory = directory.descend(c, create=True)
+                            #raise VirtualDirectoryError("Reached a file called {} while trying to resolve a symlink; cannot proceed".format(c))
                         else:
                             return f
                 else: