Allen Webster 2016-02-23 15:06:55 -05:00
commit a883787f55
1 changed files with 3 additions and 3 deletions

View File

@ -679,7 +679,6 @@ Sys_Save_File_Sig(system_save_file){
return result;
}
size_t remaining = size;
do {
ssize_t written = write(tmp_fd, data, size);
if(written == -1){
@ -691,9 +690,10 @@ Sys_Save_File_Sig(system_save_file){
return result;
}
} else {
remaining -= written;
size -= written;
data += written;
}
} while(remaining);
} while(size);
if(rename(tmp_fname, filename) == -1){
perror("system_save_file: rename");