mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-11 09:29:53 +00:00
Consider media removed if no filename was provided when attaching
This commit is contained in:
parent
524327f7be
commit
000b568dfb
@ -634,6 +634,11 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pbDevice, const PbOperation cm
|
||||
return ReturnStatus(fd, false, "Invalid device type " + PbDeviceType_Name(type));
|
||||
}
|
||||
|
||||
// If no filename was provided the media is considered removed
|
||||
if (filename.empty()) {
|
||||
device->SetRemoved(true);
|
||||
}
|
||||
|
||||
if (!pbDevice.name().empty()) {
|
||||
try {
|
||||
SetDeviceName(device, pbDevice.name());
|
||||
|
Loading…
x
Reference in New Issue
Block a user