mldonkey-commits
[Top][All Lists]
Advanced

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

[Mldonkey-commits] Changes to mldonkey/src/utils/cdk/filename2.ml


From: mldonkey-commits
Subject: [Mldonkey-commits] Changes to mldonkey/src/utils/cdk/filename2.ml
Date: Mon, 17 Oct 2005 11:25:50 -0400

Index: mldonkey/src/utils/cdk/filename2.ml
diff -u mldonkey/src/utils/cdk/filename2.ml:1.2 
mldonkey/src/utils/cdk/filename2.ml:1.3
--- mldonkey/src/utils/cdk/filename2.ml:1.2     Mon Nov  1 11:23:02 2004
+++ mldonkey/src/utils/cdk/filename2.ml Mon Oct 17 15:25:46 2005
@@ -149,6 +149,14 @@
     | _ -> ()
   done;
   s
+
+let temp_directory () =
+  match Sys.os_type with
+    "Unix" | "Cygwin" ->
+      (try Sys.getenv "TMPDIR" with Not_found -> "/tmp")
+  | "Win32" ->
+      (try Sys.getenv "TEMP" with Not_found -> ".")
+  | _ -> "."
   
 let _ = (* some assertions on these functions *)
   assert (basename "c:\\Program Files\\Toto history.exe" = "Toto history.exe");




reply via email to

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