Fix CD ROM entries appearing multiple times

This commit is contained in:
atmaxinger 2018-02-22 23:06:23 +01:00
parent 515746d584
commit f25821d067
1 changed files with 5 additions and 2 deletions

View File

@ -413,9 +413,12 @@ static NSString *makeRelativeIfNecessary(NSString *path)
NSString *p = [NSString stringWithUTF8String: path];
if(![p hasPrefix:@"/dev/"]) {
PrefsRemoveItem("cdrom", index);
}
else {
// only increase the index if the current entry has not been deleted
// if it has been deleted, the next entry is on the current entrys index
index++;
}
index++;
}
// Write all disks