Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Corrupt archive → extracting archive

This is a more correct error.

Also write exit code and potential error from tar to stderr.
  • Loading branch information...
commit b1f19e93f2156feff5c8751ff1b24a0082f18a1c 1 parent 951fd53
@sorbits sorbits authored
View
4 Frameworks/SoftwareUpdate/tests/t_sw_update.cc
@@ -79,7 +79,7 @@ class sw_update_tests : public CxxTest::TestSuite
std::string url("http://localhost:" STRINGIFY(WEB_SERVER_PORT) "/bad_bzip.tbz");
std::string err = NULL_STR;
std::string archive = sw_update::download_update(url, key_chain(), &err);
- TS_ASSERT_EQUALS(err, "Corrupt archive.");
+ TS_ASSERT_EQUALS(err, "Extracting archive.");
TS_ASSERT_EQUALS(archive, NULL_STR);
}
@@ -88,7 +88,7 @@ class sw_update_tests : public CxxTest::TestSuite
std::string url("http://localhost:" STRINGIFY(WEB_SERVER_PORT) "/bad_tar.tbz");
std::string err = NULL_STR;
std::string archive = sw_update::download_update(url, key_chain(), &err);
- TS_ASSERT_EQUALS(err, "Corrupt archive.");
+ TS_ASSERT_EQUALS(err, "Extracting archive.");
TS_ASSERT_EQUALS(archive, NULL_STR);
}
View
5 Frameworks/network/src/tbz.cc
@@ -1,5 +1,6 @@
#include "tbz.h"
#include <text/format.h>
+#include <text/trim.h>
#include <oak/datatypes.h>
#include <io/environment.h>
@@ -64,8 +65,8 @@ namespace network
{
if(WEXITSTATUS(status) == 0 && tbzOut.empty())
return true;
- error = "Corrupt archive.";
- // error = text::format("Unexpected exit code from tar (%d)\n%s\n", WEXITSTATUS(status), text::trim(tbzOut).c_str());
+ error = "Extracting archive.";
+ fprintf(stderr, "TextMate: Unexpected exit code from tar %d: %s\n", WEXITSTATUS(status), text::trim(tbzOut).c_str());
}
else
{
Please sign in to comment.
Something went wrong with that request. Please try again.