소스 검색

copy role from classpath to local storage in exists check

tags/v0.9.11
Jonathan Cobb 4 년 전
부모
커밋
eca8620ca9
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. +7
    -1
      bubble-server/src/main/java/bubble/cloud/storage/local/LocalStorageDriver.java

+ 7
- 1
bubble-server/src/main/java/bubble/cloud/storage/local/LocalStorageDriver.java 파일 보기

@@ -86,7 +86,13 @@ public class LocalStorageDriver extends CloudServiceDriverBase<LocalStorageConfi

// check classpath
@Cleanup final InputStream in = getClass().getClassLoader().getResourceAsStream(key);
return in != null;
if (in == null) return false;

// copy file to root network storage, so we can find it after activation
if (!file.getParentFile().mkdirs()) return false;
@Cleanup OutputStream out = new FileOutputStream(file);
IOUtils.copyLarge(in, out);
return true;
}

protected File metaFile(File f) { return new File(abs(f)+SUFFIX_META); }


불러오는 중...
취소
저장