mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Use csync_normalize_etag everywhere.
Technically, we don't need to strip '-gzip' from the etag comming from the propfind, but it is better to be consistant.
This commit is contained in:
parent
bdf36f58a8
commit
1b4e2becb3
@ -264,7 +264,6 @@ CSYNC_STATUS csync_errno_to_status(int error, CSYNC_STATUS default_status)
|
||||
/* Remove possible quotes, and also the -gzip at the end
|
||||
* Remove "-gzip" at the end (cf. https://github.com/owncloud/mirall/issues/1195)
|
||||
* The caller must take ownership of the resulting string.
|
||||
* (work in place)
|
||||
*/
|
||||
char *csync_normalize_etag(const char *etag)
|
||||
{
|
||||
|
||||
@ -621,13 +621,7 @@ static void results(void *userdata,
|
||||
}
|
||||
|
||||
if( md5sum ) {
|
||||
int len = strlen(md5sum)-2;
|
||||
if( len > 0 ) {
|
||||
/* Skip the " around the string coming back from the ne_propset_value call */
|
||||
newres->md5 = c_malloc(len+1);
|
||||
strncpy( newres->md5, md5sum+1, len );
|
||||
newres->md5[len] = '\0';
|
||||
}
|
||||
newres->md5 = csync_normalize_etag(md5sum);
|
||||
}
|
||||
|
||||
csync_vio_set_file_id(newres->file_id, file_id);
|
||||
|
||||
@ -185,13 +185,7 @@ static void propfind_results_recursive(void *userdata,
|
||||
}
|
||||
|
||||
if( md5sum ) {
|
||||
int len = strlen(md5sum)-2;
|
||||
if( len > 0 ) {
|
||||
/* Skip the " around the string coming back from the ne_propset_value call */
|
||||
newres->md5 = c_malloc(len+1);
|
||||
strncpy( newres->md5, md5sum+1, len );
|
||||
newres->md5[len] = '\0';
|
||||
}
|
||||
newres->md5 = csync_normalize_etag(md5sum);
|
||||
}
|
||||
|
||||
csync_vio_set_file_id(newres->file_id, file_id);
|
||||
|
||||
@ -550,8 +550,7 @@ char *csync_statedb_get_uniqId( CSYNC *ctx, uint64_t jHash, csync_vio_file_stat_
|
||||
}
|
||||
|
||||
if (result->count == 2) {
|
||||
/* phash, pathlen, path, inode, uid, gid, mode, modtime */
|
||||
ret = c_strdup( result->vector[0] );
|
||||
ret = csync_normalize_etag( result->vector[0] );
|
||||
csync_vio_file_stat_set_file_id(buf, result->vector[1]);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user