mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonGlobals.m


From: mldonkey-commits
Subject: [Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonGlobals.ml
Date: Sun, 21 Aug 2005 11:39:26 -0400

Index: mldonkey/src/daemon/common/commonGlobals.ml
diff -u mldonkey/src/daemon/common/commonGlobals.ml:1.48 
mldonkey/src/daemon/common/commonGlobals.ml:1.49
--- mldonkey/src/daemon/common/commonGlobals.ml:1.48    Thu Aug 18 14:12:30 2005
+++ mldonkey/src/daemon/common/commonGlobals.ml Sun Aug 21 15:39:21 2005
@@ -127,9 +127,14 @@
             else " no-zlib")
           ^ (if Autoconf.has_bzip2 then
               begin
-                let s = List.hd(String2.split_simplify
-                  (Bzip2.bzlib_version_num ()) ',') in
-                    Printf.sprintf " bzip2%s" (if s <> "" then "-" ^ s else "")
+                let s =
+                  (* catch the exception in the case Bzip2.bzlib_version_num 
returns an empty string *)
+                  try
+                    List.hd(String2.split_simplify
+                  (Bzip2.bzlib_version_num ()) ',') 
+                  with e -> ""
+                in
+                Printf.sprintf " bzip2%s" (if s <> "" then "-" ^ s else "")
               end
             else " no-bzip2")
           ^ (if Autoconf.has_gd && Autoconf.has_gd_png && Autoconf.has_gd_jpg 
then




reply via email to

[Prev in Thread] Current Thread [Next in Thread]