// Created: 2005-01-17
// RCS-ID: $Id$
// Copyright: (c) 2005 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// License: wxWindows licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// 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
{
// wxDebugReportCompress
// ----------------------------------------------------------------------------
+void wxDebugReportCompress::SetCompressedFileDirectory(const wxString& dir)
+{
+ wxASSERT_MSG( m_zipfile.empty(), "Too late: call this before Process()" );
+
+ m_zipDir = dir;
+}
+
+void wxDebugReportCompress::SetCompressedFileBaseName(const wxString& name)
+{
+ wxASSERT_MSG( m_zipfile.empty(), "Too late: call this before Process()" );
+
+ m_zipName = name;
+}
+
bool wxDebugReportCompress::DoProcess()
{
const size_t count = GetFilesCount();
// keep this one: for this we simply treat the directory name as the name
// of the file so that its last component becomes our base name
wxFileName fn(GetDirectory());
+ if ( !m_zipDir.empty() )
+ fn.SetPath(m_zipDir);
+ if ( !m_zipName.empty() )
+ fn.SetName(m_zipName);
fn.SetExt("zip");
// create the streams