File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -962,7 +962,7 @@ xy_str_add_quotes (const char *str)
962962 * 5. 输出时两边加单引号
963963 */
964964static char *
965- xy_path_normalize (const char * path )
965+ xy_path_canonicalize (const char * path )
966966{
967967 if (!path )
968968 return NULL ;
@@ -1021,8 +1021,8 @@ xy_2pathjoin (const char *pathstr1, const char *pathstr2)
10211021 return NULL ;
10221022 }
10231023
1024- char * normalized1 = xy_path_normalize (pathstr1 );
1025- char * normalized2 = xy_path_normalize (pathstr2 );
1024+ char * normalized1 = xy_path_canonicalize (pathstr1 );
1025+ char * normalized2 = xy_path_canonicalize (pathstr2 );
10261026
10271027 // 去除两边必定存在的单引号
10281028 char * clean1 = xy_str_remove_quotes (normalized1 );
@@ -1146,8 +1146,8 @@ xy_parent_dir (const char *path)
11461146static char *
11471147xy_path_remove_trailing_slash (const char * path )
11481148{
1149- char * normalized = xy_path_normalize (path );
1150- return normalized ; // xy_path_normalize 已经处理了末尾斜杠
1149+ char * normalized = xy_path_canonicalize (path );
1150+ return normalized ; // xy_path_canonicalize 已经处理了末尾斜杠
11511151}
11521152
11531153/**
@@ -1157,7 +1157,7 @@ xy_path_remove_trailing_slash (const char *path)
11571157static char *
11581158xy_path_ensure_trailing_slash (const char * path )
11591159{
1160- char * normalized = xy_path_normalize (path );
1160+ char * normalized = xy_path_canonicalize (path );
11611161 size_t len = strlen (normalized );
11621162
11631163 if (len == 0 || normalized [len - 1 ] == '/' )
You can’t perform that action at this time.
0 commit comments