Wireshark mailing list archives
File extension is missing on Linux when WiresharkFileDialog::getSaveFileName/QFileDialog::getSaveFileName is used
From: Jirka Novak <j.novak () netsystem cz>
Date: Wed, 24 Mar 2021 06:54:37 +0100
Hi, I noticed that when I would like to save e.g. diagram exports with Wireshark (not main dialog Save/Save As), it offers me e.g. .pdf, .ps and other extensions in save dialog. When I write just name of file and commit the dialog, created file has correct content (PDF, PS, ...), but filename is missing extension. I tested it and it happens just on Linux, but on every Linux I tested - multiple distributions from past years. On MAC or Windows it works fine. I checked the code and it looks that WiresharkFileDialog::getSaveFileName calls QFileDialog::getSaveFileName and it returns just name without extension. I tested it with QFileDialog::DontUseNativeDialog flag too, but same results. Then I compared it with CaptureFileDialog and there is method which checks whether file extension is there and then adds it if it is missing. Therefore it looks like Qt feature and some parts of Wireshark code are aware of it and fix it and some do not. Should I try to modify WiresharkFileDialog to handle it for all cases? Best regards, Jirka Novak ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- File extension is missing on Linux when WiresharkFileDialog::getSaveFileName/QFileDialog::getSaveFileName is used Jirka Novak (Mar 23)