diff options
author | Jonathan Davies <jonathan.davies@citrix.com> | 2016-03-14 17:16:55 +0000 |
---|---|---|
committer | Jonathan Davies <jonathan.davies@citrix.com> | 2016-03-14 17:23:12 +0000 |
commit | 29a6d76f70db78953aaaf7633aba32551c9b0e40 (patch) | |
tree | 707a3bf03290ee7181f18fdfdcf9930805590eb9 | |
parent | 5614b4c4c47053864b056241edf506cfd16df34a (diff) | |
download | vyos-xe-guest-utilities-29a6d76f70db78953aaaf7633aba32551c9b0e40.tar.gz vyos-xe-guest-utilities-29a6d76f70db78953aaaf7633aba32551c9b0e40.zip |
CA-203169: store successful writes
Previously, we stored the value in the write-cache if the write was
unsuccessful. Instead, store it if it was successful.
-rw-r--r-- | xenstoreclient/xenstore.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xenstoreclient/xenstore.go b/xenstoreclient/xenstore.go index 0d3e2bb..b6a5a86 100644 --- a/xenstoreclient/xenstore.go +++ b/xenstoreclient/xenstore.go @@ -374,7 +374,7 @@ func (xs *CachedXenStore) Write(path string, value string) error { } } err := xs.xs.Write(path, value) - if err != nil { + if err == nil { xs.writeCache[path] = value xs.lastCommit[path] = time.Now() } |