mirror of
https://github.com/akuker/RASCSI.git
synced 2025-02-11 00:31:22 +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));
|
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()) {
|
if (!pbDevice.name().empty()) {
|
||||||
try {
|
try {
|
||||||
SetDeviceName(device, pbDevice.name());
|
SetDeviceName(device, pbDevice.name());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user