1
0
mirror of https://github.com/chylex/Backup-Essentials.git synced 2025-04-09 23:15:43 +02:00

Fixed history entry limiter directory

This commit is contained in:
chylex 2015-04-21 23:29:25 +02:00
parent f8fa87c981
commit 9b92dd75a4

View File

@ -45,12 +45,12 @@ namespace BackupEssentials.Backup.History{
int entriesKept = Settings.Default.HistoryEntriesKept.Value, index;
if (entriesKept != -1){
while(DataStorage.HistoryEntryList.Count > entriesKept){
while(DataStorage.HistoryEntryList.Count > entriesKept){ // TODO test
string file = DataStorage.HistoryEntryList[index = DataStorage.HistoryEntryList.Count-1].Filename;
DataStorage.HistoryEntryList.RemoveAt(index);
try{
if (File.Exists(file))File.Delete(file);
if (File.Exists(file))File.Delete(Path.Combine(HistoryEntry.Directory,entry.Filename));
}catch(Exception e){
App.LogException(e);
}