Skip to content

Commit ebf8370

Browse files
committed
use absolute path
1 parent 57bff90 commit ebf8370

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

read-local-file/src/main/kotlin/io/github/llmagentbuilder/tool/readlocalfile/ReadLocalFileTool.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ class ReadLocalFileTool(private val config: ReadLocalFileConfig) :
4040
val basePath =
4141
StringUtils.trimToNull(config.basePath)?.let { Paths.get(it) }
4242
?: Paths.get(".")
43-
return basePath.resolve(request.filePath)
43+
return basePath.resolve(request.filePath).toAbsolutePath()
4444
}
4545
}

write-local-file/src/main/kotlin/io/github/llmagentbuilder/tool/writelocalfile/WriteLocalFileTool.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@ class WriteLocalFileTool(private val config: WriteLocalFileConfig) :
6767
)
6868
val filename = StringUtils.trimToNull(request.filename)
6969
return saveFileDir.resolve(filename ?: UUID.randomUUID().toString())
70+
.toAbsolutePath()
7071
}
7172
}

0 commit comments

Comments
 (0)