summaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 65ada04215d..a1341d7197d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -6425,8 +6425,9 @@ remote_download_command (char *args, int from_tty)
perror_with_name (argv[0]);
make_cleanup (fclose_cleanup, file);
- fd = remote_hostio_open (argv[1], FILEIO_O_WRONLY | FILEIO_O_CREAT, 0700,
- &remote_errno);
+ fd = remote_hostio_open (argv[1], (FILEIO_O_WRONLY | FILEIO_O_CREAT
+ | FILEIO_O_TRUNC),
+ 0700, &remote_errno);
if (fd == -1)
remote_hostio_error (remote_errno);