From 68fb0b719b969b328024a1c882c92d9ffa903bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 22 Jan 2024 20:23:36 +0900 Subject: [PATCH] =?UTF-8?q?CreateFolder=E6=94=B9=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/data/impl/LacertaLibraryImpl.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java index 16a9235c..2403426e 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java @@ -124,19 +124,10 @@ public class LacertaLibraryImpl implements LacertaLibrary { @Override public CompletableFuture createFolder(String parentId, String name) { return CompletableFuture.supplyAsync(() -> { - - FolderEntity parentFolderEntity = database.folderDao().findById(parentId); - PublicPath publicPath; - if (parentFolderEntity == null) { - publicPath = new PublicPath().resolve("/"); - } else { - publicPath = new PublicPath().resolve(parentFolderEntity.publicPath); - } - FolderEntity folderEntity = new FolderEntity(); folderEntity.id = UUID.randomUUID().toString(); folderEntity.name = name; - folderEntity.publicPath = publicPath.getStringPath(); + folderEntity.parentId = parentId; database.folderDao().insert(folderEntity); return folderEntity.id; });