+wxString XmlResApp::GetInternalFileName(const wxString& name, const wxArrayString& flist)
+{
+ wxString name2 = name;
+ name2.Replace(":", "_");
+ name2.Replace("/", "_");
+ name2.Replace("\\", "_");
+ name2.Replace("*", "_");
+ name2.Replace("?", "_");
+
+ wxString s = wxFileNameFromPath(parOutput) + "$" + name2;
+
+ if (wxFileExists(s) && flist.Index(s) == wxNOT_FOUND)
+ {
+ for (int i = 0;; i++)
+ {
+ s.Printf(wxFileNameFromPath(parOutput) + "$%03i-" + name2, i);
+ if (!wxFileExists(s) || flist.Index(s) != wxNOT_FOUND)
+ break;
+ }
+ }
+ return s;
+}