fix input filename containing a path on windows

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11000 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-12-24 13:19:55 +00:00
commit 9a94969fdd
4 changed files with 18 additions and 6 deletions

View file

@ -183,12 +183,8 @@ static FILE *Swig_open_file(const String_or_char *name, int sysfile, int use_inc
Delete(spath);
}
if (f) {
#if defined(_WIN32) /* Note not on Cygwin else filename is displayed with double '/' */
Replaceall(filename, "\\\\", "\\"); /* remove double '\' in case any already present */
Replaceall(filename, "\\", "\\\\");
#endif
Delete(lastpath);
lastpath = Copy(filename);
lastpath = Swig_filename_escape(filename);
}
Delete(filename);
return f;