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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user