mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Don't remove trailing slash
There is no trailing slashes in the path
This commit is contained in:
parent
0eb1855345
commit
5bdaf83c67
1 changed files with 3 additions and 6 deletions
|
@ -1126,6 +1126,7 @@ static int _csync_correct_id(CSYNC *ctx) {
|
|||
c_list_t *seen_dirs = NULL;
|
||||
c_list_t *list = NULL;
|
||||
c_rbtree_t *tree = NULL;
|
||||
const char *replica = NULL;
|
||||
char *path = NULL;
|
||||
|
||||
switch (ctx->current) {
|
||||
|
@ -1176,7 +1177,6 @@ static int _csync_correct_id(CSYNC *ctx) {
|
|||
int len;
|
||||
c_rbnode_t *node = NULL;
|
||||
|
||||
char pathbuf[PATH_MAX] = {'\0' };
|
||||
char *old_path = path;
|
||||
csync_file_stat_t *tfs = NULL;
|
||||
|
||||
|
@ -1214,10 +1214,7 @@ static int _csync_correct_id(CSYNC *ctx) {
|
|||
}
|
||||
}
|
||||
/* get the parent dir */
|
||||
/* copy one byte less, omit the trailing slash */
|
||||
strncpy( pathbuf, path, strlen(path)-1 );
|
||||
/* and get the path name */
|
||||
path = c_dirname( pathbuf );
|
||||
path = c_dirname( path );
|
||||
/* free the old path memory */
|
||||
SAFE_FREE(old_path );
|
||||
|
||||
|
|
Loading…
Reference in a new issue