diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-24 16:26:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-24 16:29:25 -0400 |
commit | 5244ab7656e2269676cf6296718c8e5243c5b919 (patch) | |
tree | eff2f55cfc39592de5fca8691b591c79340932ba /Assistant/Types | |
parent | 5c49f7ef10b8d61cfabd8ca9602d852ae5abe452 (diff) |
convert PendingAddChange back to Change when an add fails
If an add failed, we should lose the KeySource, since it, presumably,
differs due to a change that was made to the file.
(The locked down file is already deleted.)
Diffstat (limited to 'Assistant/Types')
-rw-r--r-- | Assistant/Types/Changes.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Assistant/Types/Changes.hs b/Assistant/Types/Changes.hs index 81fd527a6..c5680a0e6 100644 --- a/Assistant/Types/Changes.hs +++ b/Assistant/Types/Changes.hs @@ -63,6 +63,11 @@ isInProcessAddChange :: Change -> Bool isInProcessAddChange (InProcessAddChange {}) = True isInProcessAddChange _ = False +retryChange :: Change -> Change +retryChange (InProcessAddChange time ks) = + Change time (keyFilename ks) AddFileChange +retryChange c = c + finishedChange :: Change -> Key -> Change finishedChange c@(InProcessAddChange { keySource = ks }) k = Change { changeTime = changeTime c |