Skip to content

Commit

Permalink
🚑
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsword09 committed Dec 19, 2024
1 parent aa0a6f7 commit ba6b4e4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.teamdev.jxbrowser.engine.RenderingMode.HARDWARE_ACCELERATED
import com.teamdev.jxbrowser.engine.RenderingMode.OFF_SCREEN
import com.teamdev.jxbrowser.engine.event.EngineClosed
import kotlinx.atomicfu.locks.SynchronizedObject
import org.dweb_browser.platform.desktop.os.OsType
import java.io.File
import java.io.IOException
import java.nio.file.Paths
Expand Down Expand Up @@ -50,7 +51,7 @@ object jxBrowserEngine {
init {
try {
// windows系统中,如果应用安装目录可写并且不是C盘,则将jxbrowser放置于应用目录内,否则默认放置于C盘
if (File(System.getProperty("user.dir")).canWrite() && !System.getProperty("user.dir").startsWith("C:", ignoreCase = true)) {
if (OsType.current == OsType.Windows && File(System.getProperty("user.dir")).canWrite() && !System.getProperty("user.dir").startsWith("C:", ignoreCase = true)) {
System.setProperty("jxbrowser.chromium.dir", customChromiumDir.absolutePathString())
}
} catch (_: Exception) {}
Expand Down

0 comments on commit ba6b4e4

Please sign in to comment.