Don't use QFileInfo()::baseName().

It strips off all suffixes, which is not useful behavior; it assumes
that nobody uses "." for any purpose other than separating a file name
from an extension - 1994 called, they want their version of Windows
back (and UN*X called, too...).

For the "Saving XXX" status bar message, just use the entire last
component of the file name.

Change-Id: Ib34fde3e49cd791c7baf333eebb71a8dbd672c19
Reviewed-on: https://code.wireshark.org/review/28638
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-07-06 02:46:30 -07:00
parent aab5ad074e
commit 238c7dd61d
1 changed files with 1 additions and 1 deletions

View File

@ -669,7 +669,7 @@ void MainWindow::captureEventHandler(CaptureEvent ev)
{
QFileInfo file_info(ev.filePath());
main_ui_->statusBar->popFileStatus();
main_ui_->statusBar->pushFileStatus(tr("Saving %1" UTF8_HORIZONTAL_ELLIPSIS).arg(file_info.baseName()));
main_ui_->statusBar->pushFileStatus(tr("Saving %1" UTF8_HORIZONTAL_ELLIPSIS).arg(file_info.fileName()));
break;
}
default: