- wxFileName fn(GetDirectory(), filename);
- wxFFile file(fn.GetFullPath(), wxT("w"));
- if ( !file.IsOpened() || !file.Write(text) )
+ const wxString fullPath = wxFileName(GetDirectory(), filename).GetFullPath();
+#if wxUSE_FFILE
+ wxFFile file(fullPath, wxT("w"));
+#elif wxUSE_FILE
+ wxFile file(fullPath, wxFile::write);
+#endif
+ if ( !file.IsOpened() || !file.Write(text, wxConvAuto()) )