소스 검색

fix illegal char in path of dumpfile

00ll00 5 년 전
부모
커밋
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