1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-16 23:29:25 +00:00

Support archive files with same name (#705)

* Support archive files with same name

* Go support archive files with same name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2024-09-27 17:20:04 +08:00
committed by GitHub
parent 4adceee73d
commit 1afed5d770
5 changed files with 117 additions and 26 deletions

View File

@@ -459,3 +459,18 @@ seaf_parse_auth_token (const char *auth_token)
g_strfreev (parts);
return token;
}
void
split_filename (const char *filename, char **name, char **ext)
{
char *dot;
dot = strrchr (filename, '.');
if (dot) {
*ext = g_strdup (dot + 1);
*name = g_strndup (filename, dot - filename);
} else {
*name = g_strdup (filename);
*ext = NULL;
}
}