You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ja...@apache.org on 2019/04/12 04:55:07 UTC
[ant] branch master updated: Fix the issue where scp transfer
completion tracking wasn't being triggered for 100% completion
This is an automated email from the ASF dual-hosted git repository.
jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new e91c4dc Fix the issue where scp transfer completion tracking wasn't being triggered for 100% completion
e91c4dc is described below
commit e91c4dc223a0bb163ac6a292e0f26227e721ba20
Author: wenjingwang <23...@qq.com>
AuthorDate: Tue Apr 9 13:59:59 2019 +0800
Fix the issue where scp transfer completion tracking wasn't being triggered for 100% completion
This closes #91 pull request at github/apache/ant
---
CONTRIBUTORS | 1 +
WHATSNEW | 4 ++++
contributors.xml | 4 ++++
.../org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java | 7 +++----
4 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 56fb511..e83a656 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -441,6 +441,7 @@ Vladislav Bauer
Volker Leidl
Waldek Herka
Wang Weijun
+Wenjing Wang
Will Wang
William Bernardet
William Ferguson
diff --git a/WHATSNEW b/WHATSNEW
index c5d7f58..aee4b54 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -56,6 +56,10 @@ Fixed bugs:
actual address could potentially be unreachable. This is now fixed
and the resolved address is actually checked for reachability.
+ * Fixes an issue where scp transfer completion tracking wasn't being
+ triggered for 100% completion.
+ Github Pull Request #91
+
Other changes:
--------------
diff --git a/contributors.xml b/contributors.xml
index a8e53ab..3f567e6 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -1816,6 +1816,10 @@
<last>Weijun</last>
</name>
<name>
+ <first>Wenjing</first>
+ <last>Wang</last>
+ </name>
+ <name>
<first>Will</first>
<last>Wang</last>
</name>
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
index 312bf66..5091aa5 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
@@ -286,15 +286,14 @@ public class ScpFromMessage extends AbstractSshMessage {
fos.write(buf, 0, length);
filesize -= length;
totalLength += length;
- if (filesize == 0) {
- break;
- }
-
if (trackProgress) {
percentTransmitted = trackProgress(initFilesize,
totalLength,
percentTransmitted);
}
+ if (filesize == 0) {
+ break;
+ }
}
} finally {
final long endTime = System.currentTimeMillis();