When implementing a typical "Save as..." menu item for a desktop app, what should the default directory be? Must I do something different on *nix, OSX and Windows or can I get away with the same for all three?
For example, say my current directory is "/foo", and I start a program with that as its working directory. I then open up "/bar/baz.txt" and do "Save As...".
I see at least four possibilities:
- the current working directory ("/foo" in this scenario)
- the directory of the original file ("/bar" in this scenario)
- the platform-dependent user data directory for the user (eg: "/Users/<me>/Documents" on the mac)
- have an application preference that lets the user choose (with the default value being one of the other choices)
I think the best answer is 2 (directory of the current file) for the application I am currently working on but I want to know if there's a standard specification I should be following. If you answer 4, then what should the default for that preference be?