lol the hak...fix coming up
parent
8c5c973116
commit
1dc7ecfdc5
11
vm/image.c
11
vm/image.c
|
@ -112,9 +112,10 @@ bool save_image(const F_CHAR *filename)
|
|||
FILE* file;
|
||||
F_HEADER h;
|
||||
|
||||
F_CHAR temporary_filename[] = "##saving-factor-image##";
|
||||
F_CHAR temporary_filename[] = STRING_LITERAL("##saving-factor-image##");
|
||||
|
||||
file = OPEN_WRITE(temporary_filename);
|
||||
file = OPEN_WRITE(filename);
|
||||
//file = OPEN_WRITE(temporary_filename);
|
||||
if(file == NULL)
|
||||
{
|
||||
print_string("Cannot open image file: "); print_native_string(filename); nl();
|
||||
|
@ -165,11 +166,13 @@ bool save_image(const F_CHAR *filename)
|
|||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
if(MOVE_FILE_FAILS(temporary_filename, filename))
|
||||
{
|
||||
print_string("Failed to rename tempoarary image file: "); print_string(strerror(errno)); nl();
|
||||
if(DELETE_FILE_FAILS(temporary_filename))
|
||||
print_string("Failed to clean up temporary image file: "); print_string(strerror(errno)); nl();
|
||||
//if(DELETE_FILE_FAILS(temporary_filename))
|
||||
//print_string("Failed to clean up temporary image file: "); print_string(strerror(errno)); nl();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue