fixed a bug which appears in linux, but not in Mac.

git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_lsm_tree@1943 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepository.java b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepository.java
index aac34de..1eedc78 100644
--- a/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepository.java
+++ b/hyracks-storage-common/src/main/java/edu/uci/ics/hyracks/storage/common/file/PersistentLocalResourceRepository.java
@@ -54,9 +54,16 @@
         };
 
         File[] childFileList = rootFile.listFiles();
+        if (childFileList == null) {
+        	return;
+        }
         for (File childFile : childFileList) {
             if (childFile.isDirectory()) {
                 File[] targetFileList = childFile.listFiles(filter);
+                if (targetFileList == null) {
+                	return;
+                }
+                
                 for (File targetFile : targetFileList) {
                     LocalResource localResource = readLocalResource(targetFile);
                     id2ResourceMap.put(localResource.getResourceId(), localResource);