From 6b4691c8d6dc4889d817a15ab0dfd519f2ff07c1 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Sun, 18 Feb 2024 22:35:44 +0100 Subject: [PATCH] BUG: fix merge errors --- src/main/java/org/caosdb/server/filesystem/FSODescriptor.java | 1 + src/main/java/org/caosdb/server/jobs/core/AutoCreateDirs.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/java/org/caosdb/server/filesystem/FSODescriptor.java b/src/main/java/org/caosdb/server/filesystem/FSODescriptor.java index facfbcef..371b9618 100644 --- a/src/main/java/org/caosdb/server/filesystem/FSODescriptor.java +++ b/src/main/java/org/caosdb/server/filesystem/FSODescriptor.java @@ -189,6 +189,7 @@ public class FSODescriptor implements VirtualFSODescriptorInterface { public static FSODescriptor createDir(String fileStorageId, final Path dirPath) { final FSODescriptor ret = new FSODescriptor(dirPath); + ret.key = dirPath.toString(); ret.fileStorageId = fileStorageId; ret.type = ObjectType.DIRECTORY; return ret; diff --git a/src/main/java/org/caosdb/server/jobs/core/AutoCreateDirs.java b/src/main/java/org/caosdb/server/jobs/core/AutoCreateDirs.java index a2644c63..d7a632bc 100644 --- a/src/main/java/org/caosdb/server/jobs/core/AutoCreateDirs.java +++ b/src/main/java/org/caosdb/server/jobs/core/AutoCreateDirs.java @@ -14,6 +14,7 @@ import org.caosdb.server.jobs.EntityFlagJob; import org.caosdb.server.jobs.JobAnnotation; import org.caosdb.server.jobs.TransactionStage; import org.caosdb.server.permissions.EntityACL; +import org.caosdb.server.transaction.WriteTransactionInterface; @JobAnnotation( flag = "autoCreateDirs", @@ -78,6 +79,7 @@ public class AutoCreateDirs extends EntityFlagJob { child.setParentDirectory(newFD.getEntityId()); final EntityInterface newDir = new InsertEntity(name, Role.Directory); + newDir.setId(((WriteTransactionInterface) getTransaction()).generateId()); newDir.setEntityACL(EntityACL.getOwnerACLFor(getUser())); newDir.setFSODescriptor(newFD); getContainer().add(newDir); -- GitLab