ソースを参照

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); }


読み込み中…
キャンセル
保存