增加自定义表盘路径接口函数 578/2 578/head 579/target/1
authorCaisking <3449750381@qq.com>
Wed, 24 Jul 2024 01:46:12 +0000 (09:46 +0800)
committerCaisking <3449750381@qq.com>
Wed, 24 Jul 2024 01:46:12 +0000 (09:46 +0800)
code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h
code/sdk/application/wearable/fd230app/nativeui/clock/src/MainClockView.cpp

index e8a3130..a0e091e 100644 (file)
@@ -68,7 +68,7 @@ namespace OHOS
 #define APP_VIDEO_PATH "/user/video"
 #define APP_DEFAULT_DIAL_PATH "/user/dial"                 /*默认表盘安装路径*/
 #define APP_DOWNLOAD_DIAL_PATH "/user/userdata/dial"       /*表盘市场安装路径*/
-#define APP_CUSTOM_DIAL_PATH "/user/userdata/constom_dial/" /*自定义表盘安装路径*/
+#define APP_CUSTOM_DIAL_PATH "/user/userdata/constom_dial" /*自定义表盘安装路径*/
 #define APP_LIST_PATH "/user/res/applist_icon"
     /* ---------------------------------- 卡片管理 --------------------------------- */
     static constexpr const char *CARD_CONFIG_PATH = "/user/cardconfig.bin";
index 00c04ef..851aed0 100644 (file)
@@ -214,8 +214,8 @@ namespace OHOS
             return ""; // 或者返回一个空字符串
         }
 
-        std::string folderPath = APP_CUSTOM_DIAL_PATH + std::to_string(Id);
-        CreateDirectoryIfNotExists(folderPath); // 确保目录存在
+        std::string folderPath = std::string(APP_CUSTOM_DIAL_PATH) + "/" + std::to_string(Id); // 修复这一行
+        CreateDirectoryIfNotExists(folderPath);                                                // 确保目录存在
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Directory is %s", folderPath.c_str());
 
         return folderPath; // 返回目录路径