mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-02 19:54:54 -06:00
Restore empty directories
This commit is contained in:
@@ -918,7 +918,9 @@ func (manager *BackupManager) Restore(top string, revision int, inPlace bool, qu
|
||||
|
||||
|
||||
if deleteMode && len(patterns) == 0 {
|
||||
for _, file := range extraFiles {
|
||||
// Reverse the order to make sure directories are empty before being deleted
|
||||
for i := range extraFiles {
|
||||
file := extraFiles[len(extraFiles) - 1 - i]
|
||||
fullPath := joinPath(top, file)
|
||||
os.Remove(fullPath)
|
||||
LOG_INFO("RESTORE_DELETE", "Deleted %s", file)
|
||||
@@ -932,8 +934,6 @@ func (manager *BackupManager) Restore(top string, revision int, inPlace bool, qu
|
||||
}
|
||||
}
|
||||
|
||||
RemoveEmptyDirectories(top)
|
||||
|
||||
if showStatistics {
|
||||
for _, file := range downloadedFiles {
|
||||
LOG_INFO("DOWNLOAD_DONE", "Downloaded %s (%d)", file.Path, file.Size)
|
||||
|
||||
Reference in New Issue
Block a user