mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-10-27 06:09:56 -04:00
Automatically install new entry directory in EntryRefresh()
This commit is contained in:
1 parent
038cd3670d
commit
4dab9f2c93
1 file changed
+10
@@ -104,6 +104,16 @@ func EntryRefresh(oldRCWPassphrase, newRCWPassphrase []byte, removeOldDir bool)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// swap the new directory with the old one
|
||||||
|
err = os.Rename(global.EntryRoot, global.EntryRoot+"-old")
|
||||||
|
if err != nil {
|
||||||
|
return errors.New("unable to rename old directory: " + err.Error())
|
||||||
|
}
|
||||||
|
err = os.Rename(global.EntryRoot+"-new", global.EntryRoot)
|
||||||
|
if err != nil {
|
||||||
|
return errors.New("unable to rename new directory: " + err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user