[exo-jcr-commits] exo-jcr SVN: r2166 - jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Mar 26 09:00:59 EDT 2010


Author: tolusha
Date: 2010-03-26 09:00:58 -0400 (Fri, 26 Mar 2010)
New Revision: 2166

Modified:
   jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
Log:
EXOJCR-549: fix bug

Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java	2010-03-26 11:29:01 UTC (rev 2165)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java	2010-03-26 13:00:58 UTC (rev 2166)
@@ -468,7 +468,7 @@
 
          try
          {
-            if (!isCurrentBackup(cf))
+            if (!isCurrentRepositoryBackup(cf))
                logs.add(new RepositoryBackupChainLog(cf));
          }
          catch (BackupOperationException e)
@@ -498,6 +498,22 @@
    }
 
    /**
+    * isCurrentRepositoryBackup.
+    * 
+    * @param log
+    *          File, the log to backup
+    * @return boolean return the 'true' if this log is current backup.
+    */
+   private boolean isCurrentRepositoryBackup(File log)
+   {
+      for (RepositoryBackupChain chain : currentRepositoryBackups)
+         if (log.getName().equals(new File(chain.getLogFilePath()).getName()))
+            return true;
+
+      return false;
+   }
+
+   /**
     * {@inheritDoc}
     */
    @Deprecated



More information about the exo-jcr-commits mailing list