From de5cedb372c3d40480be078c6aae498f04457509 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 5 Sep 2012 16:07:22 +0000
Subject: [PATCH] don't output \r char if stream is a file

---
 Common/GmshMessage.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 415c39f730..0de083e5fe 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -470,7 +470,7 @@ void Msg::ProgressMeter(int n, int N, bool log, const char *fmt, ...)
     }
 #endif
 
-    if(log && CTX::instance()->terminal){
+    if(!streamIsFile(stdout) && log && CTX::instance()->terminal){
       fprintf(stdout, "%s                                          \r",
               (n > N - 1) ? "" : str2);
       fflush(stdout);
-- 
GitLab