Skip to content

Commit

Permalink
Move code
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Jan 25, 2025
1 parent a25ab37 commit 9ac9acd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/command/command_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,15 @@ bool CommandExecutor::Detach(const CommandContext &context, PrimaryDevice &devic
return context.ReturnLocalizedError(LocalizationKey::ERROR_DETACH);
}

// Remove both potential identifiers
PropertyHandler::GetInstance().RemoveProperties(fmt::format("{0}{1}:{2}.", PropertyHandler::DEVICE, id, lun));
PropertyHandler::GetInstance().RemoveProperties(fmt::format("{0}{1}.", PropertyHandler::DEVICE, id));

// If no LUN is left also delete the controller
if (!controller->GetLunCount() && !controller_factory.DeleteController(*controller)) {
return context.ReturnLocalizedError(LocalizationKey::ERROR_DETACH);
}

// Remove both potential identifiers
PropertyHandler::GetInstance().RemoveProperties(fmt::format("{0}{1}:{2}.", PropertyHandler::DEVICE, id, lun));
PropertyHandler::GetInstance().RemoveProperties(fmt::format("{0}{1}.", PropertyHandler::DEVICE, id));

s2p_logger.info("Detached " + identifier);
}

Expand Down

0 comments on commit 9ac9acd

Please sign in to comment.