mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Make file-existence test a per-platform function.
NFC in this commit, but this will allow me to do something more subtle and OS-specific in each OS's implementation of it.
This commit is contained in:
@ -587,3 +587,14 @@ FontSpec *fontspec_deserialise(void *vdata, int maxsize, int *used)
|
||||
GET_32BIT_MSB_FIRST(end + 4),
|
||||
GET_32BIT_MSB_FIRST(end + 8));
|
||||
}
|
||||
|
||||
int open_for_write_would_lose_data(const Filename *fn)
|
||||
{
|
||||
FILE *fp;
|
||||
if ((fp = f_open(fn, "r", FALSE)) != NULL) {
|
||||
fclose(fp);
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user