Merge branch 'master' into bb_fixes
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
index 2361bac..a8f129a 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
@@ -153,16 +153,26 @@
                     if (indexFileList != null) {
                         for (File indexFile : indexFileList) {
                             if (indexFile.isDirectory()) {
-                                File[] metadataFiles = indexFile.listFiles(filter);
-                                if (metadataFiles != null) {
-                                    for (File metadataFile : metadataFiles) {
-                                        LocalResource localResource = readLocalResource(metadataFile);
-                                        id2ResourceMap.put(localResource.getResourceId(), localResource);
-                                        name2ResourceMap.put(localResource.getResourceName(), localResource);
-                                        maxResourceId = Math.max(localResource.getResourceId(), maxResourceId);
-                                        if (LOGGER.isLoggable(Level.INFO)) {
-                                            LOGGER.info("loaded local resource - [id: " + localResource.getResourceId()
-                                                    + ", name: " + localResource.getResourceName() + "]");
+                                File[] ioDevicesList = indexFile.listFiles();
+                                if (ioDevicesList != null) {
+                                    for (File ioDeviceFile : ioDevicesList) {
+                                        if (ioDeviceFile.isDirectory()) {
+                                            File[] metadataFiles = ioDeviceFile.listFiles(filter);
+                                            if (metadataFiles != null) {
+                                                for (File metadataFile : metadataFiles) {
+                                                    LocalResource localResource = readLocalResource(metadataFile);
+                                                    id2ResourceMap.put(localResource.getResourceId(), localResource);
+                                                    name2ResourceMap
+                                                            .put(localResource.getResourceName(), localResource);
+                                                    maxResourceId = Math.max(localResource.getResourceId(),
+                                                            maxResourceId);
+                                                    if (LOGGER.isLoggable(Level.INFO)) {
+                                                        LOGGER.info("loaded local resource - [id: "
+                                                                + localResource.getResourceId() + ", name: "
+                                                                + localResource.getResourceName() + "]");
+                                                    }
+                                                }
+                                            }
                                         }
                                     }
                                 }