Skip to content

Commit

Permalink
Merge pull request eBay#85 from JacksonYao287/fix-detect_drive_type
Browse files Browse the repository at this point in the history
fix detect drive type
  • Loading branch information
JacksonYao287 authored Jun 7, 2024
2 parents 9ac4f8f + d8627dc commit fe7208b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class IOMgrConan(ConanFile):
name = "iomgr"
version = "11.3.2"
version = "11.3.3"

homepage = "https://github.com/eBay/IOManager"
description = "Asynchronous event manager"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/interfaces/drive_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static std::string get_raid_hdd_vendor_model() {

drive_type DriveInterface::detect_drive_type(const std::string& dev_name) {
if (std::filesystem::is_regular_file(std::filesystem::status(dev_name))) {
auto device = std::filesystem::path(get_mounted_device(dev_name)).filename();
auto device = get_mounted_device(dev_name);
return is_rotational_device(device) ? drive_type::file_on_hdd : drive_type::file_on_nvme;
} else if (std::filesystem::is_block_file(std::filesystem::status(dev_name))) {
return is_rotational_device(dev_name) ? drive_type::block_hdd : drive_type::block_nvme;
Expand Down

0 comments on commit fe7208b

Please sign in to comment.