Browse Source

Merge branch '104-fix-share-url-printing-on-windows' into 'master'

Resolve "Fix share URL printing on Windows"

Closes #104

See merge request timvisee/ffsend!37
Tim Visée 4 years ago
parent
commit
fa0ecf61bc
1 changed files with 11 additions and 3 deletions
  1. 11 3
      src/progress.rs

+ 11 - 3
src/progress.rs

@@ -59,9 +59,17 @@ impl<'a> ProgressReporter for ProgressBar<'a> {
 
     /// Finish the progress.
     fn finish(&mut self) {
-        self.progress_bar
+        let progress_bar = self
+            .progress_bar
             .as_mut()
-            .expect("progress bar not yet instantiated")
-            .finish_print(self.msg_finish);
+            .expect("progress bar not yet instantiated");
+
+        #[cfg(not(target_os = "windows"))]
+        progress_bar.finish_print(self.msg_finish);
+        #[cfg(target_os = "windows")]
+        {
+            progress_bar.finish_println(self.msg_finish);
+            eprintln!();
+        }
     }
 }