Skip to content

Commit 45347db

Browse files
committed
Fixed -L option being ignored when using internal taggers
Change-Id: Ia927468662cc232acb9bb9615fb56420cff73b11
1 parent b2c3e43 commit 45347db

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [v3.1.3] - unreleased
4+
5+
### Fixed
6+
7+
- Fixed `-L` (log directory) option being ignored when using internal taggers (`-T opennlp`, `-T marmot`, etc.)
8+
39
## [v3.1.2] - 2025-12-18
410

511
### Fixed

app/src/main/kotlin/de/ids_mannheim/korapxmltools/KorapXmlTool.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2079,7 +2079,14 @@ class KorapXmlTool : Callable<Int> {
20792079
}
20802080

20812081
// Set up logging to file (like krill format does)
2082-
val logFilePath = outputMorphoZipFileName.replace(Regex("\\.zip$"), ".log")
2082+
var logFilePath = outputMorphoZipFileName.replace(Regex("\\.zip$"), ".log")
2083+
2084+
if (logDir != null) {
2085+
if (!logDir!!.exists()) {
2086+
logDir!!.mkdirs()
2087+
}
2088+
logFilePath = File(logDir, File(logFilePath).name).absolutePath
2089+
}
20832090
if (File(logFilePath).parentFile?.exists() == false) {
20842091
System.err.println("Error: Output directory '${File(logFilePath).parentFile}' does not exist.")
20852092
exitProcess(1)

0 commit comments

Comments
 (0)