File tree Expand file tree Collapse file tree
app/src/main/java/com/muort/upworker/feature Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ class ScriptEditorViewModel @Inject constructor(
167167 Timber .d(" Original content length: ${content.length} , Fixed: ${fixedContent.length} " )
168168
169169 // Create temporary file
170- val tempDir = java.io.File (System .getProperty(" java.io.tmpdir" ))
170+ val tempDir = java.io.File (System .getProperty(" java.io.tmpdir" ) ? : System .getenv( " TEMP " ) ? : " /tmp " )
171171 val tempFile = java.io.File (tempDir, " $scriptName .js" )
172172
173173 try {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class WorkerViewModel @Inject constructor(
3333 val content = scriptFile.readText(Charsets .UTF_8 )
3434
3535 // 创建临时文件
36- val tempDir = java.io.File (System .getProperty(" java.io.tmpdir" ))
36+ val tempDir = java.io.File (System .getProperty(" java.io.tmpdir" ) ? : System .getenv( " TEMP " ) ? : " /tmp " )
3737 val tempFile = java.io.File (tempDir, " $scriptName .js" )
3838
3939 try {
You can’t perform that action at this time.
0 commit comments