Wireshark-bugs: [Wireshark-bugs] [Bug 1237] GUI saves files in wrong directory

Date: Wed, 22 Nov 2006 23:59:53 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1237





------- Comment #2 from vandry@xxxxxxxxx  2006-11-22 23:59 GMT -------
Ulf, Thanks for your comments.

Yes, I am asking for a third option. Furthermore, I am asking that the default
be changed because it is certainly surprising and unexpected that an
application would not honor the current working directory. It is not up to an
application to guess that it knows what the value of the cwd should be better
than what its caller set. If all applications did that then it would completely
undermine the value of the cwd and we might as well remove the 'cd' command
from shells.

I understand that many users launch WS from a GUI session manager and still
others  may launch it in different ways at different times, and I understand
that those GUI environments don't expose the concept of a cwd very well. Yet I
still expect them to set it apropriately. Doing it this way will indeed work
much better than each application trying to keep its private concept of the
pseudo-cwd, which could be a directory you haven't worked in for months (if you
haven't used that particupar application in a long time). The fact is, for an
application like Nautilus (or whatever), it's not that hard to choose an
apropriate value for the cwd before running other applications. For example, if
you launch an application by double clicking on a document (a capture file in
the case of WS) I think it's fairly obvious that the cwd should be the
directory that document came from. Otherwise it could be the most recent
directory manipulated, or the directory the session manager inherited from its
parent (which would be the user's home directory in any sane environment) if
all else fails.

To your second point, users who want to store all their capture files in a
common directory have to be expected to configure this manually anyway (if only
because they need to say where). This is presently a non-default option and I
don't propose changing that. (Personally I can't understand this desire since I
would want to store captures that have to do with project A somewhere together
with other files to do with project A, and in a different apropriate location
for project B but personal preferences are what preferences are for!)

Assuming that GUI session managers don't do any kind of smart manipulation of
the cwd as I describe above (I honestly don't know whether they do) and WS
wants to act as a band aid for this problem then that's great, but it shouldn't
be the default if it breaks such a useful and long standing concept as the cwd.
Principle of Least Astonishment! I know I'm asking for a new option and that's
why you classified this as an Enhancement, but WS breaks a useful concept that
should be expected to work and that's why I classified it asa bug.

Perhaps four modes instead of three? (1) use cwd, (2) remember directory, (3)
fixed directory, but the default is (4) autodetect: do 2 if running under a GUI
session manager and do 1 otherwise. The autodetect could work by looking for
environment variables or something like that.

I would still consider such an autodetect option a band-aid since similar logic
would have to be applied to many different applications in order for the user
to receive a consistent experience. I really do think it's the job of whoever's
launching an application to put it into the initial environment that the user
expects.

With respect to your last comment, I don't draw a distinction between how my
applications should react to the environment I use them in based on how those
applications "look". Some of my most useful tools for doing my job are
Wireshark, Vim, Mozilla, and OpenSSH. Coincidentally, half of those are GUI and
half are not, but they are all very useful tools for me. I don't really see
your meaning when you say "an odd way to work with a GUI program" which implies
that it's a perfectly normal way to work in a non-GUI program and that I should
use half my tools in a totally different way than I use the other half.

If we must agree to disagree on this and you expect most of the developers to
be unenthusiastic about it, then let me at least create and submit a patch that
can be accepted and merged to add the third option of using the cwd, without
changing the default (in that case I expect I would not get agreement to
anything stronger than that). I'll configure my copy to use that option.


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.