[med-svn] [sra-sdk] 01/03: New upstream version 2.8.1-2+dfsg

Andreas Tille tille at debian.org
Tue Jan 24 08:28:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository sra-sdk.

commit 5bdf64f02eecff40ab39acd4f6e09e258b80af04
Author: Andreas Tille <tille at debian.org>
Date:   Tue Jan 24 08:26:59 2017 +0100

    New upstream version 2.8.1-2+dfsg
---
 CHANGES.md                |  7 +++++++
 tools/prefetch/prefetch.c | 19 +++++++++++--------
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index fe7f335..e30b783 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,12 @@
 # NCBI External Developer Release:
 
+
+## SRA Toolkit 2.8.1-2
+**January 19, 2017**
+
+  **prefetch**: fixed download of dbGaP files via HTTP
+
+
 ## SRA Toolkit 2.8.1
 **December 22, 2016**
 
diff --git a/tools/prefetch/prefetch.c b/tools/prefetch/prefetch.c
index d02e794..98045f3 100644
--- a/tools/prefetch/prefetch.c
+++ b/tools/prefetch/prefetch.c
@@ -532,9 +532,9 @@ static rc_t _VResolverRemote(VResolver *self, VRemoteProtocols protocols,
     rc_t rc = 0;
     const VPath *vcache = NULL;
     assert(vaccession && vremote);
-    if (*vremote != NULL) {
+    if (*vremote != NULL)
         RELEASE(VPath, *vremote);
-    }
+
     rc = V_ResolverRemote(self, protocols, vaccession, vremote, &vcache);
     if (rc == 0) {
         char path[PATH_MAX] = "";
@@ -546,6 +546,7 @@ static rc_t _VResolverRemote(VResolver *self, VRemoteProtocols protocols,
             char *query = string_chr(path, len, '?');
             if (query != NULL) {
                 *query = '\0';
+                len = query - path;
             }
             StringInit(&local_str, path, len, (uint32_t)len);
             RELEASE(String, *remote);
@@ -553,13 +554,12 @@ static rc_t _VResolverRemote(VResolver *self, VRemoteProtocols protocols,
             DISP_RC2(rc, "StringCopy(VResolverRemote)", name);
         }
     }
-    else if (NotFoundByResolver(rc)) {
+    else if (NotFoundByResolver(rc))
         PLOGERR(klogErr, (klogErr, rc, "'$(acc)' cannot be found.",
             "acc=%s", name));
-    }
-    else {
+    else
         DISP_RC2(rc, "Cannot resolve remote", name);
-    }
+
     if (rc == 0 && cache != NULL) {
         String path_str;
         if (vcache == NULL) {
@@ -568,19 +568,22 @@ static rc_t _VResolverRemote(VResolver *self, VRemoteProtocols protocols,
                 "for $(acc).", /* Try to cd out of protected repository.", */
                 "acc=%s" , name));
         }
+
         if (rc == 0) {
             rc = VPathGetPath(vcache, &path_str);
             DISP_RC2(rc, "VPathGetPath(VResolverCache)", name);
         }
+
         if (rc == 0) {
-            if (*cache != NULL) {
+            if (*cache != NULL)
                 free((void*)*cache);
-            }
             rc = StringCopy(cache, &path_str);
             DISP_RC2(rc, "StringCopy(VResolverCache)", name);
         }
     }
+
     RELEASE(VPath, vcache);
+
     return rc;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/sra-sdk.git



More information about the debian-med-commit mailing list