Skip to content
Snippets Groups Projects
Commit 0af80853 authored by felmer's avatar felmer
Browse files

SSDM-2465: Bug fixed in SegmentedStoreUtils.copyToShare(): Error status of...

SSDM-2465: Bug fixed in SegmentedStoreUtils.copyToShare(): Error status of rsync copy command is no longer ignored.

SVN: 34805
parent 89008aad
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,8 @@ import ch.systemsx.cisd.common.collection.CollectionUtils; ...@@ -41,6 +41,8 @@ import ch.systemsx.cisd.common.collection.CollectionUtils;
import ch.systemsx.cisd.common.collection.SimpleComparator; import ch.systemsx.cisd.common.collection.SimpleComparator;
import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException; import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException;
import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException; import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
import ch.systemsx.cisd.common.exceptions.ExceptionWithStatus;
import ch.systemsx.cisd.common.exceptions.Status;
import ch.systemsx.cisd.common.exceptions.UserFailureException; import ch.systemsx.cisd.common.exceptions.UserFailureException;
import ch.systemsx.cisd.common.filesystem.FileOperations; import ch.systemsx.cisd.common.filesystem.FileOperations;
import ch.systemsx.cisd.common.filesystem.FileUtilities; import ch.systemsx.cisd.common.filesystem.FileUtilities;
...@@ -584,7 +586,11 @@ public class SegmentedStoreUtils ...@@ -584,7 +586,11 @@ public class SegmentedStoreUtils
logger.log(LogLevel.INFO, String.format("Start moving directory '%s' to new share '%s'", logger.log(LogLevel.INFO, String.format("Start moving directory '%s' to new share '%s'",
file.getPath(), share.getPath())); file.getPath(), share.getPath()));
final RsyncCopier copier = new RsyncCopier(OSUtilities.findExecutable(RSYNC_EXEC)); final RsyncCopier copier = new RsyncCopier(OSUtilities.findExecutable(RSYNC_EXEC));
copier.copyContent(file, share, null, null); Status status = copier.copyContent(file, share, null, null);
if (status.isError())
{
throw new ExceptionWithStatus(status);
}
logger.log(LogLevel.INFO, String.format( logger.log(LogLevel.INFO, String.format(
"Finished moving directory '%s' to new share '%s' in %.2f s", file.getPath(), "Finished moving directory '%s' to new share '%s' in %.2f s", file.getPath(),
share.getPath(), (System.currentTimeMillis() - start) / 1000.0)); share.getPath(), (System.currentTimeMillis() - start) / 1000.0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment