Skip to content

Commit 1a4c5cd

Browse files
psync_upload_data_as added remote filename
1 parent 685f2bd commit 1a4c5cd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

psynclib.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,8 +1575,8 @@ int psync_upload_data(psync_folderid_t folderid, const char *remote_filename, co
15751575
return psync_upload_params(params, ARRAY_SIZE(params), data, length, fileid);
15761576
}
15771577

1578-
int psync_upload_data_as(const char *remote_path, const void *data, size_t length, psync_fileid_t *fileid){
1579-
binparam params[]={P_STR("auth", psync_my_auth), P_STR("path", remote_path), P_BOOL("nopartial", 1)};
1578+
int psync_upload_data_as(const char *remote_path, const char *remote_filename, const void *data, size_t length, psync_fileid_t *fileid){
1579+
binparam params[]={P_STR("auth", psync_my_auth), P_STR("path", remote_path), P_STR("filename", remote_filename), P_BOOL("nopartial", 1)};
15801580
return psync_upload_params(params, ARRAY_SIZE(params), data, length, fileid);
15811581
}
15821582

@@ -1630,13 +1630,13 @@ int psync_upload_file(psync_folderid_t folderid, const char *remote_filename, co
16301630
return ret;
16311631
}
16321632

1633-
int psync_upload_file_as(const char *remote_path, const char *local_path, psync_fileid_t *fileid){
1633+
int psync_upload_file_as(const char *remote_path, const char *remote_filename, const char *local_path, psync_fileid_t *fileid){
16341634
char *data;
16351635
size_t length;
16361636
int ret;
16371637
if (psync_load_file(local_path, &data, &length))
16381638
return -2;
1639-
ret=psync_upload_data_as(remote_path, data, length, fileid);
1639+
ret=psync_upload_data_as(remote_path, remote_filename, data, length, fileid);
16401640
psync_free(data);
16411641
return ret;
16421642
}

psynclib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,9 +934,9 @@ void psync_run_new_version(psync_new_version_t *ver);
934934
*/
935935

936936
int psync_upload_data(psync_folderid_t folderid, const char *remote_filename, const void *data, size_t length, psync_fileid_t *fileid);
937-
int psync_upload_data_as(const char *remote_path, const void *data, size_t length, psync_fileid_t *fileid);
937+
int psync_upload_data_as(const char *remote_path, const char *remote_filename, const void *data, size_t length, psync_fileid_t *fileid);
938938
int psync_upload_file(psync_folderid_t folderid, const char *remote_filename, const char *local_path, psync_fileid_t *fileid);
939-
int psync_upload_file_as(const char *remote_path, const char *local_path, psync_fileid_t *fileid);
939+
int psync_upload_file_as(const char *remote_path, const char *remote_filename, const char *local_path, psync_fileid_t *fileid);
940940

941941
/* Filesystem functions.
942942
*

0 commit comments

Comments
 (0)