Skip to content

Commit

Permalink
Suppress UOE for containers configured to use S3 (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-jeckels authored Mar 5, 2024
1 parent 2e428be commit 8bb0e12
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions blast/src/org/labkey/blast/BLASTManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@

import java.io.File;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Date;
import java.util.Map;

Expand Down Expand Up @@ -106,13 +109,13 @@ public File getBinDir()
public File getDatabaseDir(Container c, boolean createIfDoesntExist)
{
FileContentService fileService = FileContentService.get();
File fileRoot = fileService == null ? null : fileService.getFileRoot(c, FileContentService.ContentType.files);
if (fileRoot == null || !fileRoot.exists())
Path fileRoot = fileService == null ? null : fileService.getFileRootPath(c, FileContentService.ContentType.files);
if (fileRoot == null || fileRoot.getFileSystem() != FileSystems.getDefault())
{
return null;
}

File ret = new File(fileRoot, ".blastDB");
File ret = new File(fileRoot.toFile(), ".blastDB");
if (createIfDoesntExist && !ret.exists())
{
ret.mkdirs();
Expand Down

0 comments on commit 8bb0e12

Please sign in to comment.