Build Information:
/Applications/Wireshark.app/Contents/MacOS/Wireshark -v
FIX: packet list heading menu sensitivity
wireshark 1.11.2 (SVN Rev 53411 from /trunk)
Copyright 1998-2013 Gerald Combs <gerald@wireshark.org> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (64-bit) with Qt 5.1.1 with GLib 2.36.0, with libpcap, with libz 1.2.3,
without POSIX capabilities, with SMI 0.4.8, without c-ares, without ADNS, with
Lua 5.1, without Python, with GnuTLS 2.12.19, with Gcrypt 1.5.0, with MIT
Kerberos, with GeoIP, without PortAudio, with AirPcap.
Running on Mac OS X 10.9.2, build 13C64 (Darwin 13.1.0), with locale
en_US.UTF-8, with libpcap version 1.3.0 - Apple version 41, with libz 1.2.5,
GnuTLS 2.12.19, Gcrypt 1.5.0, without AirPcap.
Intel(R) Core(TM) i5-2435M CPU @ 2.40GHz
Built using llvm-gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build
2336.9.00).
If you have never opened a capture file (e.g. fresh install), the Open Capture File dialog defaults to / rather than the user's home folder, which is typical on OSX.
Steps to reproduce:
After a fresh install, use file->open... or command+o, bring up the Open Capture File window
Note the current selected folder
Behaviour Encountered:
The current selected folder is /
Behaviour Expected:
The current selected folder is ~ (e.g /Users/edonahue)
At least in a test with Notepad on Windows 11, the user home directory (or, if the type of file being processed has a standard subdirectory of that, perhaps that subdirectory - but I don't think "packet capture files" has such a standard subdirectory) appears to be the default for saving files, so I'm guessing it'd be the default for opening them as well.
I haven't yet tried it on any UN*X+{X11,Wayland} platform such as, say, Ubuntu Linux, but I suspect the answer is the same there as well.
This uses the current working directory which is what I expect. That should continue to work.
!13130 (closed) seems to unconditionally set the home directory. That seems the wrong behavior.
I can confirm that starting Wireshark on macOS with an empty configuration directory defaults to /. To address that, I think we should add a special case for / instead of unconditionally setting it.
Starting from the command line or from clicking on an icon?
Opening the run subdirectory of the build directory in the Finder, and double-clicking on the Wireshark icon, causes Wireshark to start in /, according to a debugging printout I added that gets the current directory with getcwd().
So special-casing / in places where we're using the current directory in all file open/save dialogs would work.
This uses the current working directory which is what I expect. That should continue to work.
I.e., if you start with no recent file, it should use the directory in which it's started as the directory, unless that's "/", in which case it should use the home directory.
If you've already done an open or save, the next one will default to the previous directory used, and all subsequent ones will do the same, which is what programs on macOS tend to do.