mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-23 19:29:18 +00:00
Only remove item at index
This commit is contained in:
parent
f2fcfffabb
commit
515746d584
@ -409,11 +409,13 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||
// Remove all cdroms (but keep the ones in /dev/)
|
||||
const char *path;
|
||||
int index=0;
|
||||
while ((path = PrefsFindString("cdrom", index++)) != NULL) {
|
||||
while ((path = PrefsFindString("cdrom", index)) != NULL) {
|
||||
NSString *p = [NSString stringWithUTF8String: path];
|
||||
if(![p hasPrefix:@"/dev/"]) {
|
||||
PrefsRemoveItem("cdrom");
|
||||
PrefsRemoveItem("cdrom", index);
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
// Write all disks
|
||||
|
Loading…
Reference in New Issue
Block a user