Formatting changes to repair

This commit is contained in:
Sude 2013-04-06 05:50:44 +03:00
parent f3f26d4da3
commit cfbc61d1f7

View File

@ -690,7 +690,7 @@ int Downloader::repairFile(std::string url, std::string filepath, std::string xm
std::string range = ss.str(); std::string range = ss.str();
ss.str(std::string()); ss.str(std::string());
std::cout << "\tChunk " << i << " (" << chunk_size << " bytes): "; std::cout << "\033[0K\rChunk " << i << " (" << chunk_size << " bytes): ";
fseek(outfile, begin, SEEK_SET); fseek(outfile, begin, SEEK_SET);
unsigned char *chunk = (unsigned char *) malloc(chunk_size * sizeof(unsigned char *)); unsigned char *chunk = (unsigned char *) malloc(chunk_size * sizeof(unsigned char *));
if (chunk == NULL) if (chunk == NULL)
@ -724,12 +724,12 @@ int Downloader::repairFile(std::string url, std::string filepath, std::string xm
} }
else else
{ {
std::cout << "OK" << std::endl; std::cout << "OK\r" << std::flush;
} }
free(chunk); free(chunk);
res = 1; res = 1;
} }
std::cout << std::endl;
fclose(outfile); fclose(outfile);
return res; return res;