mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-10-27 06:09:56 -04:00
Fix backup/temp directory cleaning in EntryRefresh()
This commit is contained in:
1 parent
ca277ba773
commit
2840ff3cf2
1 file changed
+2
-2
@@ -32,10 +32,10 @@ func EntryRefresh(oldRCWPassphrase, newRCWPassphrase []byte, removeOldDir bool)
|
||||
for i, dirEnd := range dirEnds {
|
||||
if i == 1 && !removeOldDir {
|
||||
if _, err := os.Stat(global.EntryRoot + dirEnd); !os.IsNotExist(err) {
|
||||
return errors.New("unable to refresh entries: \"" + global.EntryRoot + "-new\" already exists")
|
||||
return errors.New("unable to refresh entries: \"" + global.EntryRoot + dirEnd + "\" already exists")
|
||||
}
|
||||
}
|
||||
os.RemoveAll(global.EntryRoot + "-new")
|
||||
os.RemoveAll(global.EntryRoot + dirEnd)
|
||||
}
|
||||
|
||||
// create output directory structure (global.EntryRoot + "-new"/*)
|
||||
|
||||
Reference in new issue
Block a user