mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-09-03 20:21:47 +00:00
Merge pull request #7 from gao-feng/tuncate
tuncate file in write file command
This commit is contained in:
+1
-1
@@ -791,7 +791,7 @@ static int hyper_cmd_write_file(char *json, int length)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
fd = open(writter.file, O_CREAT| O_WRONLY, 0644);
|
||||
fd = open(writter.file, O_CREAT| O_TRUNC| O_WRONLY, 0644);
|
||||
if (fd < 0) {
|
||||
perror("fail to open target file");
|
||||
goto exit;
|
||||
|
||||
Reference in New Issue
Block a user