Browse Source

Remove some more ResourceManager

Change-Id: I4dd45e1d6c8de9e35071d22cce999f368798e540
Reviewed-on: http://gerrit.dmdirc.com/4025
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
pull/1/head
Greg Holmes 9 years ago
parent
commit
06b9044534
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      src/com/dmdirc/plugins/PluginInfo.java

+ 10
- 2
src/com/dmdirc/plugins/PluginInfo.java View File

@@ -313,9 +313,17 @@ public class PluginInfo implements Comparable<PluginInfo>, ServiceProvider {
313 313
      * this plugin.
314 314
      */
315 315
     private void loadIdentities() {
316
+        if (!Files.exists(pluginFilesystem.getPath("/META-INF/identities/"))) {
317
+            return;
318
+        }
316 319
         try {
317
-            final Map<String, InputStream> identityStreams = getResourceManager()
318
-                    .getResourcesStartingWithAsInputStreams("META-INF/identities/");
320
+            final Map<String, InputStream> identityStreams = new HashMap<>();
321
+            try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(
322
+                    pluginFilesystem.getPath("/META-INF/licenses/"))) {
323
+                for (Path path : directoryStream) {
324
+                    identityStreams.put(path.getFileName().toString(), Files.newInputStream(path));
325
+                }
326
+            }
319 327
 
320 328
             unloadIdentities();
321 329
 

Loading…
Cancel
Save