Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
3ab8d9e2
Commit
3ab8d9e2
authored
17 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
minor: improve logging when assertion fails
SVN: 1879
parent
ca25e989
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datamover/source/java/ch/systemsx/cisd/datamover/filesystem/remote/rsync/RsyncCopier.java
+13
-2
13 additions, 2 deletions
...x/cisd/datamover/filesystem/remote/rsync/RsyncCopier.java
with
13 additions
and
2 deletions
datamover/source/java/ch/systemsx/cisd/datamover/filesystem/remote/rsync/RsyncCopier.java
+
13
−
2
View file @
3ab8d9e2
...
@@ -117,9 +117,9 @@ public class RsyncCopier implements IPathCopier
...
@@ -117,9 +117,9 @@ public class RsyncCopier implements IPathCopier
public
Status
copy
(
File
sourcePath
,
String
sourceHost
,
File
destinationDirectory
,
String
destinationHost
)
public
Status
copy
(
File
sourcePath
,
String
sourceHost
,
File
destinationDirectory
,
String
destinationHost
)
{
{
assert
sourcePath
!=
null
;
assert
sourcePath
!=
null
;
assert
sourceHost
!=
null
||
sourcePath
.
exists
();
assert
sourceHost
!=
null
||
sourcePath
.
exists
()
:
logNonExistent
(
sourcePath
)
;
assert
destinationDirectory
!=
null
;
assert
destinationDirectory
!=
null
;
assert
destinationHost
!=
null
||
destinationDirectory
.
isDirectory
();
assert
destinationHost
!=
null
||
destinationDirectory
.
isDirectory
()
:
logNonExistent
(
sourcePath
)
;
assert
sourceHost
==
null
||
destinationHost
==
null
;
// only one side can be remote
assert
sourceHost
==
null
||
destinationHost
==
null
;
// only one side can be remote
final
File
destinationPath
=
new
File
(
destinationDirectory
,
sourcePath
.
getName
());
final
File
destinationPath
=
new
File
(
destinationDirectory
,
sourcePath
.
getName
());
...
@@ -163,6 +163,17 @@ public class RsyncCopier implements IPathCopier
...
@@ -163,6 +163,17 @@ public class RsyncCopier implements IPathCopier
}
}
}
}
private
String
logNonExistent
(
File
path
)
{
if
(
path
==
null
)
{
return
"null"
;
}
else
{
return
"path '"
+
path
.
getAbsolutePath
()
+
"' does not exist"
;
}
}
private
List
<
String
>
createCommandLine
(
File
sourcePath
,
String
sourceHost
,
File
destinationDirectory
,
private
List
<
String
>
createCommandLine
(
File
sourcePath
,
String
sourceHost
,
File
destinationDirectory
,
String
destinationHost
)
String
destinationHost
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment