parent
565add21a7
commit
ea400bc3ff
|
@ -630,7 +630,7 @@ data_write(void)
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
f = fopen(tmpo, "r");
|
f = fopen(tmpo, "rb");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
|
|
|
@ -62,7 +62,7 @@ source_fetch_file(char *fil, char *filname)
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char buf[256 * 1024];
|
char buf[256 * 1024];
|
||||||
|
|
||||||
f = fopen(fil, "r");
|
f = fopen(fil, "rb");
|
||||||
if (!f)
|
if (!f)
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
|
|
|
@ -230,7 +230,7 @@ output(void)
|
||||||
printf("ERROR: potential security violation. attempt to write in parent dir.\n");
|
printf("ERROR: potential security violation. attempt to write in parent dir.\n");
|
||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
f = fopen(out, "w");
|
f = fopen(out, "wb");
|
||||||
fwrite(font, fontsize, 1, f);
|
fwrite(font, fontsize, 1, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
free(font);
|
free(font);
|
||||||
|
|
|
@ -111,7 +111,7 @@ encdectest(void)
|
||||||
blah.blah3 = evas_list_append(blah.blah3, &blah3);
|
blah.blah3 = evas_list_append(blah.blah3, &blah3);
|
||||||
|
|
||||||
data = eet_data_descriptor_encode(edd, &blah, &size);
|
data = eet_data_descriptor_encode(edd, &blah, &size);
|
||||||
f = fopen("out", "w");
|
f = fopen("out", "wb");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
fwrite(data, size, 1, f);
|
fwrite(data, size, 1, f);
|
||||||
|
@ -214,7 +214,7 @@ depak_file(Eet_File *ef, char *file)
|
||||||
eet_mkdirs(buf);
|
eet_mkdirs(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
f = fopen(file, "w");
|
f = fopen(file, "wb");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
fwrite(data, 1, size, f);
|
fwrite(data, 1, size, f);
|
||||||
|
@ -291,7 +291,7 @@ pak_file(Eet_File *ef, char *file, char **noz, int noz_num)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
f = fopen(file, "r");
|
f = fopen(file, "rb");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
int compress = 1;
|
int compress = 1;
|
||||||
|
|
|
@ -372,12 +372,12 @@ eet_open(char *file, Eet_File_Mode mode)
|
||||||
|
|
||||||
/* try open the file based on mode */
|
/* try open the file based on mode */
|
||||||
if ((ef->mode == EET_FILE_MODE_READ) || (ef->mode == EET_FILE_MODE_RW))
|
if ((ef->mode == EET_FILE_MODE_READ) || (ef->mode == EET_FILE_MODE_RW))
|
||||||
ef->fp = fopen(ef->path, "r");
|
ef->fp = fopen(ef->path, "rb");
|
||||||
else if (ef->mode == EET_FILE_MODE_WRITE)
|
else if (ef->mode == EET_FILE_MODE_WRITE)
|
||||||
{
|
{
|
||||||
/* opening for write - delete old copy of file right away */
|
/* opening for write - delete old copy of file right away */
|
||||||
unlink(ef->real_path);
|
unlink(ef->real_path);
|
||||||
ef->fp = fopen(ef->path, "w");
|
ef->fp = fopen(ef->path, "wb");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -616,7 +616,7 @@ eet_open(char *file, Eet_File_Mode mode)
|
||||||
{
|
{
|
||||||
fclose(ef->fp);
|
fclose(ef->fp);
|
||||||
unlink(ef->real_path);
|
unlink(ef->real_path);
|
||||||
ef->fp = fopen(ef->path, "w");
|
ef->fp = fopen(ef->path, "wb");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add to cache */
|
/* add to cache */
|
||||||
|
|
Loading…
Reference in New Issue