Browse Source

Fix SIOOBe when extracting a resource without a path with usePath set to true

Fixes issue 1564


git-svn-id: http://svn.dmdirc.com/trunk@4453 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Chris Smith 16 years ago
parent
commit
0694bc072b
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/com/dmdirc/util/resourcemanager/ResourceManager.java

+ 1
- 1
src/com/dmdirc/util/resourcemanager/ResourceManager.java View File

147
         
147
         
148
         File newDir;
148
         File newDir;
149
         
149
         
150
-        if (usePath) {
150
+        if (usePath && resourceName.indexOf('/') > -1) {
151
             newDir = new File(directory,
151
             newDir = new File(directory,
152
                     resourceName.substring(0, resourceName.lastIndexOf('/')) + "/");
152
                     resourceName.substring(0, resourceName.lastIndexOf('/')) + "/");
153
         } else {
153
         } else {

Loading…
Cancel
Save