Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index bb46dd7..ca9851c 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -422,16 +422,18 @@ void WellenreiterMainWindow::uploadSession() | |||
422 | rhost_info = (struct hostent *) ::gethostbyname( CAP_hostname ); | 422 | rhost_info = (struct hostent *) ::gethostbyname( CAP_hostname ); |
423 | if ( rhost_info ) | 423 | if ( rhost_info ) |
424 | { | 424 | { |
425 | if ( !QFile::exists( "/var/log/dump.wellenreiter" ) ) | 425 | |
426 | |||
427 | if ( !QFile::exists( mw->captureFileName() ) ) | ||
426 | { | 428 | { |
427 | QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Logfile doesn't exist</p>") ); | 429 | QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Logfile '%1' doesn't exist</p>").arg( mw->captureFileName() ) ); |
428 | return; | 430 | return; |
429 | } | 431 | } |
430 | 432 | ||
431 | QFile f( "/var/log/dump.wellenreiter" ); | 433 | QFile f( mw->captureFileName() ); |
432 | if ( !f.open( IO_ReadOnly ) ) | 434 | if ( !f.open( IO_ReadOnly ) ) |
433 | { | 435 | { |
434 | QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Can't open Logfile</p>") ); | 436 | QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Can't open Logfile '%1'</p>").arg( mw->captureFileName() ) ); |
435 | return; | 437 | return; |
436 | } | 438 | } |
437 | 439 | ||
@@ -481,7 +483,7 @@ void WellenreiterMainWindow::uploadSession() | |||
481 | "\r\n" | 483 | "\r\n" |
482 | "%3\r\n" | 484 | "%3\r\n" |
483 | "-----------------------------97267758015830030481215568065\r\n" | 485 | "-----------------------------97267758015830030481215568065\r\n" |
484 | "Content-Disposition: form-data; name=\"upfile\"; filename=\"/var/log/dump.wellenreiter\"\r\n" | 486 | "Content-Disposition: form-data; name=\"upfile\"; filename=\"%4\"\r\n" |
485 | "Content-Type: application/octet-stream\r\n" | 487 | "Content-Type: application/octet-stream\r\n" |
486 | "\r\n"; | 488 | "\r\n"; |
487 | 489 | ||
@@ -491,6 +493,7 @@ void WellenreiterMainWindow::uploadSession() | |||
491 | content = content.arg( from->text().isEmpty() ? QString( "Anonymous Wellenreiter II User" ) : from->text() ); | 493 | content = content.arg( from->text().isEmpty() ? QString( "Anonymous Wellenreiter II User" ) : from->text() ); |
492 | content = content.arg( location->text().isEmpty() ? QString( "Anonymous Wellenreiter II Location" ) : location->text() ); | 494 | content = content.arg( location->text().isEmpty() ? QString( "Anonymous Wellenreiter II Location" ) : location->text() ); |
493 | content = content.arg( comments->text().isEmpty() ? QString( "Anonymous Wellenreiter II Comments" ) : comments->text() ); | 495 | content = content.arg( comments->text().isEmpty() ? QString( "Anonymous Wellenreiter II Comments" ) : comments->text() ); |
496 | content = content.arg( mw->captureFileName() ); | ||
494 | 497 | ||
495 | header = header.arg( QString::number( content.length() + f.size() + preambel.length() ) ); | 498 | header = header.arg( QString::number( content.length() + f.size() + preambel.length() ) ); |
496 | 499 | ||