Updating branch refs/heads/master
         to 84bedf71bd18d76b3690d65c64969848a95b21be (commit)
       from 8e8fc02996235e43ea64f94f09f65d0ae9a3f547 (commit)

commit 84bedf71bd18d76b3690d65c64969848a95b21be
Author: Christian Dywan <[email protected]>
Date:   Mon Nov 26 19:25:59 2012 +0100

    Use one folder to contain speed dial test files

 tests/speeddial.vala |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/speeddial.vala b/tests/speeddial.vala
index 1716b77..97e34b9 100644
--- a/tests/speeddial.vala
+++ b/tests/speeddial.vala
@@ -8,11 +8,13 @@
 
  See the file COPYING for the full license text.
 */
+static string? tmp_folder = null;
 string get_test_file (string contents) {
-    string file;
-    int fd = FileUtils.open_tmp ("speeddialXXXXXX", out file);
+    if (tmp_folder == null)
+        tmp_folder = Midori.Paths.make_tmp_dir ("speeddialXXXXXX");
+    string checksum = Checksum.compute_for_string (ChecksumType.MD5, contents);
+    string file = Path.build_path (Path.DIR_SEPARATOR_S, tmp_folder, checksum);
     FileUtils.set_contents (file, contents, -1);
-    FileUtils.close (fd);
     return file;
 }
 
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to