mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 11:48:56 +03:00
owncloud: Fix the _creat function.
This commit is contained in:
parent
d5145e1e0a
commit
2f90d5ac6f
1 changed files with 7 additions and 1 deletions
|
@ -559,7 +559,13 @@ static csync_vio_method_handle_t *_open(const char *durl,
|
||||||
}
|
}
|
||||||
|
|
||||||
static csync_vio_method_handle_t *_creat(const char *durl, mode_t mode) {
|
static csync_vio_method_handle_t *_creat(const char *durl, mode_t mode) {
|
||||||
return _open(durl, O_CREAT|O_WRONLY|O_TRUNC, mode);
|
|
||||||
|
csync_vio_method_handle_t *handle = _open(durl, O_CREAT|O_WRONLY|O_TRUNC, mode);
|
||||||
|
|
||||||
|
/* on create, the file needs to be created empty */
|
||||||
|
_write( handle, NULL, 0 );
|
||||||
|
|
||||||
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _close(csync_vio_method_handle_t *fhandle) {
|
static int _close(csync_vio_method_handle_t *fhandle) {
|
||||||
|
|
Loading…
Reference in a new issue