diff --git a/appsrc/appconfig/basic/zappversion.hpp b/appsrc/appconfig/basic/zappversion.hpp index ca1b75a..885706e 100644 --- a/appsrc/appconfig/basic/zappversion.hpp +++ b/appsrc/appconfig/basic/zappversion.hpp @@ -1,3 +1,3 @@ #pragma once -#define VERSION "3.2.4" +#define VERSION "3.2.5" #define PROJECT_NAME "TRANSMIT_DM" \ No newline at end of file diff --git a/appsrc/baseservice/udisk_mgr_service.cpp b/appsrc/baseservice/udisk_mgr_service.cpp index d78bb8e..5609b48 100644 --- a/appsrc/baseservice/udisk_mgr_service.cpp +++ b/appsrc/baseservice/udisk_mgr_service.cpp @@ -15,12 +15,17 @@ bool UDiskMgrService::isDetectedUDisk(string& diskpath) { string dev = fmt::format("/dev/sd{}", (char)('a' + i)); logger->info("check dev: {}", dev); if (access(dev.c_str(), F_OK) == 0) { - string subdev = fmt::format("/dev/sd{}1", (char)('a' + i)); - if (access(subdev.c_str(), F_OK) == 0) { - diskpath = subdev; - } else { - diskpath = dev; + for (int j = 0; j < 10; j++) { + string subdev = fmt::format("/dev/sd{}{}", (char)('a' + i), j); + if (access(subdev.c_str(), F_OK) == 0) { + logger->info("found subdev: {}", subdev); + diskpath = subdev; + m_ismounted = true; + return true; + } } + + diskpath = dev; m_ismounted = true; return true; }