[gnome-games] snapshot: Create temporary snapshot in xdg-cache rather than snapshots dir



commit 39d89f88ac8b1aa0c8d62eed263283376588b7d5
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Dec 11 21:37:23 2020 +0500

    snapshot: Create temporary snapshot in xdg-cache rather than snapshots dir
    
    Avoid loading them by accident later.

 src/core/snapshot.vala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/core/snapshot.vala b/src/core/snapshot.vala
index 847da723..b4669ef6 100644
--- a/src/core/snapshot.vala
+++ b/src/core/snapshot.vala
@@ -149,7 +149,8 @@ public class Games.Snapshot : Object {
 
        public static Snapshot create_empty (Game game, string core_id, string path) throws Error {
                var random = Random.next_int ();
-               var tmp_path = @"$(path)_$random";
+               var cache_path = Environment.get_user_cache_dir ();
+               var tmp_path = Path.build_filename (cache_path, "gnome-games", @"snapshot-$random");
 
                var dir = File.new_for_path (tmp_path);
                dir.make_directory ();


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