rewrite path normalize function

This commit is contained in:
sunphsjtu
2021-04-29 17:10:26 +08:00
parent 5d13421ae8
commit af847cc62e
2 changed files with 72 additions and 80 deletions

View File

@@ -168,10 +168,10 @@ static int copy(const char *from, const char *to)
int abs_from_len, abs_to_len;
char *last_name;
int last_name_len;
char *GetAbsolutePath(const char *parent, const char *filename);
char *GetAbsolutePath(const char *path);
abs_from = GetAbsolutePath(NULL, from);
abs_to = GetAbsolutePath(NULL, to);
abs_from = GetAbsolutePath(from);
abs_to = GetAbsolutePath(to);
if (abs_from == NULL || abs_to == NULL)
goto err;