@@ -104,7 +104,7 @@ std::shared_ptr<UploadSession> session;
104104std::mutex finishSignalMutex;
105105std::condition_variable finishSignal;
106106bool finished = false ;
107-
107+ int funcResult = 0 ;
108108struct TaskUserData {
109109 int index;
110110};
@@ -175,11 +175,13 @@ void OnUploadSessionFinished(UploadSession* session) {
175175 for (int i = 0 ; i < taskCount; i++) {
176176 auto task = session->getTask (i);
177177 UploadResult* res = task->uploadResult ();
178- auto * fileTask = dynamic_cast <FileUploadTask*>(task.get ());
178+ // auto* fileTask = dynamic_cast<FileUploadTask*>(task.get());
179179 if ( task->uploadSuccess () ) {
180180 OutputGenerator::UploadObject uo;
181181 uo.fillFromUploadResult (res, task.get ());
182182 uploadedList.push_back (uo);
183+ } else {
184+ funcResult++;
183185 }
184186 }
185187 OutputGenerator::OutputGeneratorFactory factory;
@@ -287,7 +289,6 @@ int func() {
287289#ifdef _WIN32
288290 GdiPlusInitializer gdiPlusInitializer;
289291#endif
290- int res = 0 ;
291292 auto uploadErrorHandler = std::make_shared<ConsoleUploadErrorHandler>();
292293 ServiceLocator* serviceLocator = ServiceLocator::instance ();
293294 serviceLocator->setUploadErrorHandler (uploadErrorHandler);
@@ -366,7 +367,7 @@ int func() {
366367 {
367368 std::string errorMessage = str (boost::format (" File '%s' doesn't exist!" )%filesToUpload[i]);
368369 ConsoleUtils::instance ()->printUnicode (stderr, errorMessage);
369- res ++;
370+ funcResult ++;
370371 continue ;
371372 }
372373
@@ -393,7 +394,7 @@ int func() {
393394 while (!finished) {
394395 finishSignal.wait (lk/* , [] {return finished;}*/ );
395396 }
396- return res ;
397+ return funcResult ;
397398}
398399
399400
@@ -426,6 +427,12 @@ void PrintServerParamList()
426427 for (auto & parameter : parameterList) {
427428 std::cout << ++i << " ) " << parameter->getTitle () << std::endl
428429 << " Name: " << parameter->getName () << " Type: " << parameter->getType () << std::endl;
430+
431+ std::string description = parameter->getDescription ();
432+
433+ if (!description.empty ()) {
434+ std::cout << description << std::endl;
435+ }
429436 }
430437 } else {
431438 throw std::invalid_argument (" This server cannot have parameters" );
@@ -529,7 +536,7 @@ int main(int argc, char *argv[]){
529536 .store_into (serverName);
530537
531538 program.add_argument (" -l" , " --list" )
532- .help (" Print server list (hostings ) and exit " )
539+ .help (" Prints server list (hosting services ) and exits " )
533540 .action ([=](const auto & s) {
534541 PrintServerList ();
535542 std::exit (0 );
@@ -659,11 +666,12 @@ int main(int argc, char *argv[]){
659666 .default_value (" http" )
660667 .nargs (1 );
661668
669+ #ifdef _WIN32
662670 program.add_argument (" -ps" , " --proxy_system" )
663- .help (" Use system proxy settings (this option supported only on Windows)" )
671+ .help (" Use system proxy settings (this option is supported only on Windows)" )
664672 .flag ()
665673 .store_into (useSystemProxy);
666- # ifdef _WIN32
674+
667675 program.add_argument (" -up" , " --update" )
668676 .help (" Update servers.xml. The 'Data' directory must be writable, otherwise update will fail." )
669677 .action ([=](const auto & s) {
0 commit comments