mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-23 10:01:46 +00:00
33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
diff -urN atftp-0.7.dfsg/tftpd_file.c atftp-0.7.dfsg-winpaths/tftpd_file.c
|
|
--- atftp-0.7.dfsg/tftpd_file.c 2008-06-20 10:33:43.000000000 -0400
|
|
+++ atftp-0.7.dfsg-winpaths/tftpd_file.c 2008-06-20 10:39:51.000000000 -0400
|
|
@@ -474,6 +474,28 @@
|
|
/* verify that the requested file exist */
|
|
fp = fopen(filename, "r");
|
|
|
|
+ /* if it didn't exist, consider the possibilty of Windows */
|
|
+ if (fp == NULL)
|
|
+ {
|
|
+ char* idx;
|
|
+ idx = strchr(filename,'\\');
|
|
+ while (idx) {
|
|
+ (*idx) = '/';
|
|
+ idx = strchr(filename,'\\');
|
|
+ }
|
|
+ if (strstr(filename,"/Boot/BCD"))
|
|
+ {
|
|
+ char bcdfilename[MAXLEN];
|
|
+ strncpy(bcdfilename,filename,MAXLEN);
|
|
+ strncat(bcdfilename,".",MAXLEN);
|
|
+ strncat(bcdfilename,inet_ntoa(sa->sin_addr),MAXLEN);
|
|
+ fp = fopen(bcdfilename, "r");
|
|
+ }
|
|
+ if (fp == NULL)
|
|
+ {
|
|
+ fp = fopen(filename,"r");
|
|
+ }
|
|
+ }
|
|
#ifdef HAVE_PCRE
|
|
if (fp == NULL)
|
|
{
|