Author: areshetnyak
Date: 2011-01-04 10:36:06 -0500 (Tue, 04 Jan 2011)
New Revision: 3769
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/WorkspaceDBCleaner.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java
Log:
EXOJCR-1077 : The problem with portability repository backup created on OS Windows to OS
Linux was fixed.
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/WorkspaceDBCleaner.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/WorkspaceDBCleaner.java 2011-01-04
14:52:22 UTC (rev 3768)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/jdbc/cleaner/WorkspaceDBCleaner.java 2011-01-04
15:36:06 UTC (rev 3769)
@@ -83,7 +83,7 @@
this.containerName = wsEntry.getName();
LockManagerEntry lockEntry = wsEntry.getLockManager();
- if (lockEntry != null)
+ if (lockEntry != null && lockEntry.getParameters() != null)
{
for (String tableName :
AbstractCacheableLockManager.getLockTableNames(lockEntry))
{
Modified:
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java
===================================================================
---
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java 2011-01-04
14:52:22 UTC (rev 3768)
+++
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java 2011-01-04
15:36:06 UTC (rev 3769)
@@ -45,6 +45,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
+import java.net.URL;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
@@ -149,8 +150,11 @@
for (String path : wsLogFilePathList)
{
writer.writeStartElement("url");
-
writer.writeCharacters(path.replace(PrivilegedFileHelper.getCanonicalPath(config.getBackupDir())
- + File.separator, ""));
+ URL urlPath = new URL("file:" + path);
+ URL urlBackupDir =
+ new URL("file:" +
PrivilegedFileHelper.getCanonicalPath(config.getBackupDir()) + File.separator);
+
+ writer.writeCharacters(urlPath.toString().replace(urlBackupDir.getPath(),
""));
writer.writeEndElement();
}
@@ -421,10 +425,13 @@
{
if (version != null && version.equals(VERSION_LOG_1_1))
{
- String path =
-
PrivilegedFileHelper.getCanonicalPath(config.getBackupDir()) + File.separator
- + readContent();
- wsBackupInfo.add(path);
+ String path = readContent();
+ path = path.replace("file:", "file:" +
PrivilegedFileHelper.getCanonicalPath(config.getBackupDir()) + File.separator);
+
+
+ URL urlPath = new URL(path);
+
+ wsBackupInfo.add(urlPath.getFile());
}
else
{
Show replies by date