Issue #3036 Added check for archive's root directories.
Former-commit-id:fa703c0060
[formerly039e4b5209
] [formerly7a2775ecbc
] [formerlyfa703c0060
[formerly039e4b5209
] [formerly7a2775ecbc
] [formerly3259d4d44d
[formerly7a2775ecbc
[formerly f344acf3572150c7470ab1e3c3bbb356166c78ff]]]] Former-commit-id:3259d4d44d
Former-commit-id:a447baa5a0
[formerly39f7eb1ecc
] [formerly c60f0141107a305c80631ce1cee234f0b2f3d1d4 [formerlyf71aee1e36
]] Former-commit-id: 5be90d0016ef7703bbda9ec332f33b977a87956f [formerlyd9015cddb4
] Former-commit-id:6751691433
This commit is contained in:
parent
f23d3ea0b9
commit
be6b9a2db6
1 changed files with 14 additions and 1 deletions
|
@ -96,6 +96,7 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
* Mar 21, 2014 2835 rjpeter Optimized getDisplayData to only scan directories to the depth required to
|
||||
* populate the display label.
|
||||
* Apr 01, 2014 2862 rferrel Moved purge only routines to ArchivePurgeManager.
|
||||
* Apr 29, 2014 3036 rferrel Check for missing archive root directories.
|
||||
* </pre>
|
||||
*
|
||||
* @author rferrel
|
||||
|
@ -578,7 +579,12 @@ public class ArchiveConfigManager {
|
|||
List<File> dirList = polledDirs.get(dir);
|
||||
if (dirList == null) {
|
||||
File[] list = dir.listFiles();
|
||||
dirList = Arrays.asList(list);
|
||||
// Missing directory.
|
||||
if (list == null) {
|
||||
dirList = new ArrayList<File>(0);
|
||||
} else {
|
||||
dirList = Arrays.asList(list);
|
||||
}
|
||||
polledDirs.put(dir, dirList);
|
||||
}
|
||||
|
||||
|
@ -732,6 +738,13 @@ public class ArchiveConfigManager {
|
|||
}
|
||||
|
||||
File rootFile = new File(rootDirName);
|
||||
if (!(rootFile.isDirectory() && rootFile.canRead())) {
|
||||
statusHandler.handle(
|
||||
Priority.ERROR,
|
||||
"Unable to access archive directory: "
|
||||
+ rootFile.getAbsolutePath());
|
||||
}
|
||||
|
||||
TreeMap<String, Map<CategoryDataSet, Set<File>>> displays = new TreeMap<String, Map<CategoryDataSet, Set<File>>>();
|
||||
Map<CategoryDataSet, List<File>> dirMap = getDirs(rootFile,
|
||||
categoryConfig, maxDepth);
|
||||
|
|
Loading…
Add table
Reference in a new issue