Skip to content

Commit

Permalink
use absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcheng1982 committed May 8, 2024
1 parent 57bff90 commit ebf8370
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ class ReadLocalFileTool(private val config: ReadLocalFileConfig) :
val basePath =
StringUtils.trimToNull(config.basePath)?.let { Paths.get(it) }
?: Paths.get(".")
return basePath.resolve(request.filePath)
return basePath.resolve(request.filePath).toAbsolutePath()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ class WriteLocalFileTool(private val config: WriteLocalFileConfig) :
)
val filename = StringUtils.trimToNull(request.filename)
return saveFileDir.resolve(filename ?: UUID.randomUUID().toString())
.toAbsolutePath()
}
}

0 comments on commit ebf8370

Please sign in to comment.