mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
fix getcwd
This commit is contained in:
parent
76412b7262
commit
0484e52b8a
@ -214,14 +214,14 @@ ret_t fs_os_get_exe(fs_t* fs, char path[MAX_PATH + 1]) {
|
||||
}
|
||||
|
||||
static ret_t fs_os_get_cwd(fs_t* fs, char path[MAX_PATH + 1]) {
|
||||
int32_t size = getcwd(path, MAX_PATH);
|
||||
const char* p = NULL;
|
||||
|
||||
(void)fs;
|
||||
if (size >= 0) {
|
||||
path[size] = '\0';
|
||||
*path = '\0';
|
||||
p = getcwd(path, MAX_PATH);
|
||||
if (p != NULL) {
|
||||
return RET_OK;
|
||||
} else {
|
||||
*path = '\0';
|
||||
return RET_FAIL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user