Make empty start up more robust
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / runtime / CmsStateImpl.java
index b76ca5792deeb20ade7a6f4167b7909de2ee3590..cb806444fc668c3e5508263de895e376b741f924 100644 (file)
@@ -149,9 +149,10 @@ public class CmsStateImpl implements CmsState {
                                log.debug("## CMS starting... (" + uuid + ")\n" + sb + "\n");
                        }
 
-                       Path nodeBase = getDataPath(KernelConstants.DIR_PRIVATE);
-                       if (nodeBase != null && !Files.exists(nodeBase)) {// first init
+                       Path privateBase = getDataPath(KernelConstants.DIR_PRIVATE);
+                       if (privateBase != null && !Files.exists(privateBase)) {// first init
                                firstInit();
+                               Files.createDirectories(privateBase);
                        }
 
                } catch (RuntimeException | IOException e) {