[gnome-ostree] snapshot: If given explicit path, use it



commit 7ff62ad0b715da2e7143147315cfbe77d93857e1
Author: Colin Walters <walters verbum org>
Date:   Fri Jan 11 11:36:09 2013 -0500

    snapshot: If given explicit path, use it
    
    Rather than trying to find it in the jsondb.  Fixes the previous
    commit to ostbuild autobuilder which passes --snapshot to build.

 src/ostbuild/js/snapshot.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/ostbuild/js/snapshot.js b/src/ostbuild/js/snapshot.js
index 8925aa8..bdf9daa 100644
--- a/src/ostbuild/js/snapshot.js
+++ b/src/ostbuild/js/snapshot.js
@@ -19,6 +19,7 @@
 const Gio = imports.gi.Gio;
 
 const JsonDB = imports.jsondb;
+const JsonUtil = imports.jsonutil;
 const Lang = imports.lang;
 
 function _componentDict(snapshot) {
@@ -64,7 +65,7 @@ function snapshotDiff(a, b) {
 function load(db, prefix, pathName, cancellable) {
     if (pathName) {
 	let path = Gio.File.new_for_path(pathName);
-	return [db.loadFromPath(Gio.File.new_for_path(pathName), cancellable), path];
+	return [JsonUtil.loadJson(path, cancellable), path];
     } else if (prefix) {
 	let path = db.getLatestPath();
 	return [db.loadFromPath(path, cancellable), path];



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