// Created: 2005-01-17
// RCS-ID: $Id$
// Copyright: (c) 2005 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// License: wxWindows licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// directory, so do our best to create a unique name ourselves
//
// of course, this doesn't protect us against malicious users...
- wxFileName fn;
- fn.AssignTempFileName(appname);
#if wxUSE_DATETIME
m_dir.Printf(wxT("%s%c%s_dbgrpt-%lu-%s"),
- fn.GetPath().c_str(), wxFILE_SEP_PATH, appname.c_str(),
+ wxFileName::GetTempDir(), wxFILE_SEP_PATH, appname,
wxGetProcessId(),
- wxDateTime::Now().Format(wxT("%Y%m%dT%H%M%S")).c_str());
+ wxDateTime::Now().Format(wxT("%Y%m%dT%H%M%S")));
#else
m_dir.Printf(wxT("%s%c%s_dbgrpt-%lu"),
- fn.GetPath().c_str(), wxFILE_SEP_PATH, appname.c_str(),
+ wxFileName::GetTempDir(), wxFILE_SEP_PATH, appname,
wxGetProcessId());
#endif
// we need to copy the file to the debug report directory: give it the
// same name there
name = fn.GetFullName();
- wxCopyFile(fn.GetFullPath(),
- wxFileName(GetDirectory(), name).GetFullPath());
+
+ if (!wxCopyFile(fn.GetFullPath(),
+ wxFileName(GetDirectory(), name).GetFullPath()))
+ return;
}
else // file relative to the report directory
{
wxArrayString output, errors;
int rc = wxExecute(wxString::Format
(
- wxT("%s -F %s=@\"%s\" %s"),
+ wxT("%s -F \"%s=@%s\" %s"),
m_curlCmd.c_str(),
m_inputField.c_str(),
GetCompressedFileName().c_str(),