Skip to content

Commit

Permalink
fix: 修复手动选择文件夹完整路径的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
jixiaoyong committed Jan 17, 2024
1 parent d598616 commit dfe19d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/io/github/jixiaoyong/utils/FileChooseUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object FileChooseUtil {


/**
* @return 返回选择的文件完整路径
* @return 返回选择的文件夹完整路径
*/
fun chooseSignDirectory(
window: ComposeWindow,
Expand All @@ -46,6 +46,6 @@ object FileChooseUtil {
jFileChooser.currentDirectory = oldDirectory?.let { File(it) }
jFileChooser.fileSelectionMode = JFileChooser.DIRECTORIES_ONLY
jFileChooser.showDialog(window.glassPane, "选择")
return jFileChooser.selectedFile?.parent
return jFileChooser.currentDirectory?.absolutePath
}
}

0 comments on commit dfe19d3

Please sign in to comment.