mirror of https://github.com/apache/cassandra
make sure manifest's parent dirs exist before trying to write the file.
This commit is contained in:
parent
e241319b23
commit
d267cf88c8
|
|
@ -2171,9 +2171,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
final JSONObject manifestJSON = new JSONObject();
|
||||
manifestJSON.put("files", filesJSONArr);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (!manifestFile.getParentFile().exists())
|
||||
manifestFile.getParentFile().mkdirs();
|
||||
PrintStream out = new PrintStream(manifestFile);
|
||||
out.println(manifestJSON.toJSONString());
|
||||
out.close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue