Author: andrew.plotnikov
Date: 2012-02-20 09:11:26 -0500 (Mon, 20 Feb 2012)
New Revision: 5670
Modified:
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
Log:
EXOJCR-1767: Fixed BackupManager throws NPE in case of wrong configuration of backup logs
folder
Modified:
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
===================================================================
---
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2012-02-20
14:02:22 UTC (rev 5669)
+++
jcr/branches/1.15.x/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2012-02-20
14:11:26 UTC (rev 5670)
@@ -830,6 +830,11 @@
*/
public void start()
{
+ if (!PrivilegedFileHelper.exists(tempDir))
+ {
+ throw new IllegalStateException("Directory " +
tempDir.getAbsolutePath() + " not found. Please create it.");
+ }
+
//remove if exists all old jcrrestorewi*.tmp files.
File[] files = PrivilegedFileHelper.listFiles(tempDir, new JcrRestoreWiFilter());
for (int i = 0; i < files.length; i++)
Show replies by date