owncloud: memclear a buf and remove not needed win32 code.

This commit is contained in:
Klaas Freitag 2012-03-07 20:59:13 +01:00
parent ad453115b4
commit fd9a380fc9

View file

@ -712,6 +712,7 @@ static csync_vio_method_handle_t *owncloud_open(const char *durl,
struct transfer_context *writeCtx = NULL;
csync_stat_t statBuf;
memset( getUrl, '\0', PATH_MAX );
(void) mode; /* unused on webdav server */
DEBUG_WEBDAV(( "=> open called for %s\n", durl ));
@ -779,15 +780,6 @@ static csync_vio_method_handle_t *owncloud_open(const char *durl,
}
#else
writeCtx->tmpFileName = c_strdup( "/tmp/csync.XXXXXX" );
#ifdef _WIN32
if( c_tmpname( writeCtx->tmpFileName ) == 0 ) {
_fmode = _O_BINARY;
writeCtx->fd = open( writeCtx->tmpFileName, O_RDWR | O_CREAT | O_EXCL, 0600 );
} else {
writeCtx->fd = -1;
}
#else
writeCtx->fd = mkstemp( writeCtx->tmpFileName );
#endif
DEBUG_WEBDAV(("opening temp directory %s\n", writeCtx->tmpFileName ));