mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Use a random generated temporary file name.
This commit is contained in:
parent
1255c46668
commit
aec3f4440c
1 changed files with 3 additions and 1 deletions
|
@ -114,10 +114,12 @@ static int _csync_push_file(CSYNC *ctx, csync_file_stat_t *st) {
|
|||
ctx->replica = drep;
|
||||
|
||||
/* create the temporary file name */
|
||||
if (asprintf(&turi, "%s.ctmp", duri) < 0) {
|
||||
if (asprintf(&turi, "%s.XXXXXX", duri) < 0) {
|
||||
rc = -1;
|
||||
goto out;
|
||||
}
|
||||
turi = mktemp(turi);
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_NOTICE, "file: %s", turi);
|
||||
|
||||
/* Open the destination file */
|
||||
ctx->replica = drep;
|
||||
|
|
Loading…
Reference in a new issue