server.c
branchsaveflie
changeset 95 13360d8af313
parent 94 330324fc7c20
--- a/server.c	Wed Feb 16 20:57:32 2011 +0100
+++ b/server.c	Wed Feb 16 21:07:11 2011 +0100
@@ -149,7 +149,8 @@
 
     if (command_line.s_param.savefile)
     {
-        savefile = open(command_line.s_param.savefile, O_CREAT | O_RDWR, 0666);
+        savefile = open(command_line.s_param.savefile,
+                O_CREAT | O_TRUNC | O_RDWR, 0666);
     }
 
     child = fork_app(command_line.s_param.command);