Diff between 46a56a675b1187f8f906d21188ca2b4f6ee55e6c and 646066a660927a70533387bd3f06d2f4e5201511

Changed Files

File Additions Deletions Status
obexd/src/obex.c +1 -1 modified

Full Patch

diff --git a/obexd/src/obex.c b/obexd/src/obex.c
index 4dbd21c..6badc47 100644
--- a/obexd/src/obex.c
+++ b/obexd/src/obex.c
@@ -522,7 +522,7 @@ gint os_prepare_put(struct obex_session *os)
 
 	path = g_build_filename(os->current_folder, os->name, NULL);
 
-	os->fd = open(path, O_WRONLY | O_CREAT, 0600);
+	os->fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
 	if (os->fd < 0) {
 		error("open(%s): %s (%d)", path, strerror(errno), errno);
 		g_free(path);