mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Fixes URL encoded path returned by resource.getFile() (#8865)
This commit is contained in:
parent
3a8d44820f
commit
e256ebefa8
1 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,8 @@ package mage.util;
|
|||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
import java.util.jar.JarEntry;
|
||||
|
@ -43,6 +45,11 @@ public final class ClassScanner {
|
|||
filePath = filePath.substring("file:".length(), filePath.lastIndexOf('!'));
|
||||
jars.add(filePath);
|
||||
} else {
|
||||
try {
|
||||
filePath = resource.toURI().getPath();
|
||||
} catch (URISyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
dirs.put(filePath, packageName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue