diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c index 97531ad59cf35f8d443e040cb316aedda179668a..f47a60ee5dc34da490b16155143b43f326205b90 100644 --- a/components/dfs/src/dfs_posix.c +++ b/components/dfs/src/dfs_posix.c @@ -890,9 +890,9 @@ int access(const char *path, int amode) char *getcwd(char *buf, size_t size) { #ifdef DFS_USING_WORKDIR - rt_enter_critical(); + dfs_lock(); strncpy(buf, working_directory, size); - rt_exit_critical(); + dfs_unlock(); #else rt_kprintf(NO_WORKING_DIR); #endif