Skip to content

Commit 8bb0e12

Browse files
Suppress UOE for containers configured to use S3 (#273)
1 parent 2e428be commit 8bb0e12

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

blast/src/org/labkey/blast/BLASTManager.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444

4545
import java.io.File;
4646
import java.io.IOException;
47+
import java.nio.file.FileSystems;
48+
import java.nio.file.Files;
49+
import java.nio.file.Path;
4750
import java.util.Date;
4851
import java.util.Map;
4952

@@ -106,13 +109,13 @@ public File getBinDir()
106109
public File getDatabaseDir(Container c, boolean createIfDoesntExist)
107110
{
108111
FileContentService fileService = FileContentService.get();
109-
File fileRoot = fileService == null ? null : fileService.getFileRoot(c, FileContentService.ContentType.files);
110-
if (fileRoot == null || !fileRoot.exists())
112+
Path fileRoot = fileService == null ? null : fileService.getFileRootPath(c, FileContentService.ContentType.files);
113+
if (fileRoot == null || fileRoot.getFileSystem() != FileSystems.getDefault())
111114
{
112115
return null;
113116
}
114117

115-
File ret = new File(fileRoot, ".blastDB");
118+
File ret = new File(fileRoot.toFile(), ".blastDB");
116119
if (createIfDoesntExist && !ret.exists())
117120
{
118121
ret.mkdirs();

0 commit comments

Comments
 (0)