aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/coq.ml
diff options
context:
space:
mode:
authorGravatar Virgile Prevosto <virgile.prevosto@m4x.org>2014-03-06 16:48:46 +0100
committerGravatar Pierre Boutillier <pierre.boutillier@ens-lyon.org>2014-03-06 16:48:46 +0100
commit74daa5391b3076b815b7f2f916ed6675d98c3c25 (patch)
treebdb2616b113f0af92b6345417b9c75d34a1562b2 /ide/coq.ml
parent42a04b75717d719d013af902379450e4c0e72928 (diff)
remove trailing '\r' from file names returned by coqtop
Diffstat (limited to 'ide/coq.ml')
-rw-r--r--ide/coq.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/ide/coq.ml b/ide/coq.ml
index a7535bfab..280f1df68 100644
--- a/ide/coq.ml
+++ b/ide/coq.ml
@@ -52,6 +52,12 @@ let version () =
let rec read_all_lines in_chan =
try
let arg = input_line in_chan in
+ let len = String.length arg in
+ let arg =
+ if arg.[len - 1] = '\r' then
+ String.sub arg 0 (len - 1)
+ else arg
+ in
arg::(read_all_lines in_chan)
with End_of_file -> []