mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-16 23:37:14 -04:00
Check writable on jarfile for conifg (#1084)
This commit is contained in:
parent
8748b8c277
commit
c3fc22c6a9
@ -108,7 +108,7 @@ public final class ConfigHolder {
|
|||||||
try {
|
try {
|
||||||
Path jarPath = Paths.get(ConfigHolder.class.getProtectionDomain().getCodeSource().getLocation()
|
Path jarPath = Paths.get(ConfigHolder.class.getProtectionDomain().getCodeSource().getLocation()
|
||||||
.toURI()).toAbsolutePath();
|
.toURI()).toAbsolutePath();
|
||||||
if (Files.isRegularFile(jarPath)) {
|
if (Files.isRegularFile(jarPath) && Files.isWritable(jarPath)) {
|
||||||
jarPath = jarPath.getParent();
|
jarPath = jarPath.getParent();
|
||||||
exePath = jarPath;
|
exePath = jarPath;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user