On Wed, Apr 11, 2007 at 10:48:17PM -0700, Zack Weinberg wrote:
> If you do instead
>
> ofstream fout(system_path(idx(args, 0)).as_external().c_str(),
> ofstream::out);
>
> then the system_path constructor will adjust the path so the file
> lands where the user expects. [Really you should use write_data() as
> well, but I am not sure how to construct the "temporary directory"
> argument it wants.]
Yeah, and it'll even work in non-utf8 locales! For people who put
accents in their keyfile names, you know.
The docs at the top of paths.hh are good reading. (Or if they aren't,
it'd be good to hear why not ;-).)