summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-06-15 13:56:40 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-06-26 17:57:29 +0200
commit1e8951d8cc1da1420c73dda2a3e913b13838de58 (patch)
treec19d1e25e54bbe2b86cdccac2caeed285c95d2a7 /src
parent59677e140ed064813660641d8e841e0fcc4af0ea (diff)
downloadjustbuild-1e8951d8cc1da1420c73dda2a3e913b13838de58.tar.gz
Allow non-upwards symlinks with Git API
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/execution_api/git/git_api.hpp6
-rw-r--r--src/buildtool/file_system/file_system_manager.hpp1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/git/git_api.hpp b/src/buildtool/execution_api/git/git_api.hpp
index acbab788..69179fe1 100644
--- a/src/buildtool/execution_api/git/git_api.hpp
+++ b/src/buildtool/execution_api/git/git_api.hpp
@@ -112,9 +112,9 @@ class GitApi final : public IExecutionApi {
for (auto const& [path, entry] : *tree) {
json[path] =
Artifact::ObjectInfo{
- .digest =
- ArtifactDigest{
- entry->Hash(), /*size*/ 0, entry->IsTree()},
+ .digest = ArtifactDigest{entry->Hash(),
+ /*size*/ 0,
+ entry->IsTree()},
.type = entry->Type(),
.failed = false}
.ToString(/*size_unknown*/ true);
diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp
index d5b4bf41..5d86a4ff 100644
--- a/src/buildtool/file_system/file_system_manager.hpp
+++ b/src/buildtool/file_system/file_system_manager.hpp
@@ -852,6 +852,7 @@ class FileSystemManager {
kSetEpochTime,
kSetWritable>(content, file, fd_less);
case ObjectType::Symlink:
+ return CreateSymlinkAs<kSetEpochTime>(content, file);
case ObjectType::Tree:
return false;
}