Skip to content

Commit 6da3149

Browse files
author
Mikachu2333
committed
rename to xy_path_canonicalize
1 parent da9748f commit 6da3149

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/xy.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ xy_str_add_quotes (const char *str)
962962
* 5. 输出时两边加单引号
963963
*/
964964
static 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)
11461146
static char *
11471147
xy_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)
11571157
static char *
11581158
xy_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] == '/')

0 commit comments

Comments
 (0)