summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorShell <[email protected]>2023-10-25 15:11:32 +0800
committerguo <[email protected]>2023-10-25 18:40:44 +0800
commit91fc52df3635d5dda8285616420f08efa79cea04 (patch)
treeaed4ea9cce0f0e90b54e1a5676aa73c14f70b339 /components
parente94b759160693f8735becb1b0297a9a7a6b90012 (diff)
fixup: merge condition
Diffstat (limited to 'components')
-rw-r--r--components/dfs/dfs_v1/src/dfs.c2
-rw-r--r--components/dfs/dfs_v2/src/dfs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/components/dfs/dfs_v1/src/dfs.c b/components/dfs/dfs_v1/src/dfs.c
index 94bd8385cd..3db9a0bba2 100644
--- a/components/dfs/dfs_v1/src/dfs.c
+++ b/components/dfs/dfs_v1/src/dfs.c
@@ -759,7 +759,7 @@ up_one:
/* remove '/' in the end of path if exist */
dst--;
- if (dst >= fullpath && (dst != fullpath) && (*dst == '/'))
+ if (dst > fullpath && (*dst == '/'))
*dst = '\0';
/* final check fullpath is not empty, for the special path of lwext "/.." */
diff --git a/components/dfs/dfs_v2/src/dfs.c b/components/dfs/dfs_v2/src/dfs.c
index 62e5805d7a..d7a5eac002 100644
--- a/components/dfs/dfs_v2/src/dfs.c
+++ b/components/dfs/dfs_v2/src/dfs.c
@@ -668,7 +668,7 @@ char *dfs_normalize_path(const char *directory, const char *filename)
/* remove '/' in the end of path if exist */
dst--;
- if (dst >= fullpath && (dst != fullpath) && (*dst == '/'))
+ if (dst > fullpath && (*dst == '/'))
*dst = '\0';
/* final check fullpath is not empty, for the special path of lwext "/.." */