Просмотр исходного кода

fix illegal char in path of dumpfile

00ll00 5 лет назад
Родитель
Сommit
e2cf559744
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/main/kotlin/bot_luo_core/cli/CmdContext.kt

+ 2 - 2
src/main/kotlin/bot_luo_core/cli/CmdContext.kt

@@ -133,11 +133,11 @@ class CmdContext(
         if (text.isBlank()) return null
         withBackendBot{ contact ->
             if (contact !is FileSupported) return null
-            val file = File.createTempFile("output-${this.hashCode().toString(16)}",".txt")
+            val file = File.createTempFile("dumpfile-${this.hashCode().toString(16)}",".txt")
             file.deleteOnExit()
             file.writeText(text)
             file.toExternalResource().use { resource ->
-                return  contact.sendMessageWithLog(contact.uploadFile("${this.reader.original.content.replace(' ','_')}.txt",resource))
+                return  contact.sendMessageWithLog(contact.uploadFile("dumpfile-${this.hashCode().toString(16)}.txt",resource))
             }
         }
         return null