projects
/
mirrors
/
FD230.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3297aa0
)
优化runtime文件存储
author
penglei
<1624952103@qq.com>
Fri, 20 Dec 2024 09:07:44 +0000
(17:07 +0800)
committer
penglei
<1624952103@qq.com>
Fri, 20 Dec 2024 09:07:44 +0000
(17:07 +0800)
code/sdk/drivers/peripheral/utils/custom_save_runtime.c
patch
|
blob
|
history
diff --git
a/code/sdk/drivers/peripheral/utils/custom_save_runtime.c
b/code/sdk/drivers/peripheral/utils/custom_save_runtime.c
index
094632a
..
f01a39c
100644
(file)
--- a/
code/sdk/drivers/peripheral/utils/custom_save_runtime.c
+++ b/
code/sdk/drivers/peripheral/utils/custom_save_runtime.c
@@
-107,6
+107,16
@@
uint8_t uapi_runtime_file_count(char *folderpath)
struct dirent *entry;
uint8_t count = 0;
+ if(access(RUNTIME_LOG_SAVE_PATH, F_OK) == -1)
+ {
+ int ret = mkdir(RUNTIME_LOG_SAVE_PATH, 0777);
+ if(ret == -1)
+ {
+ PRINT("mkdir %s failed \r\n",RUNTIME_LOG_SAVE_PATH);
+ return 0;
+ }
+ }
+
dir = opendir(folderpath);
if (dir == NULL)
{