ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] How can you determine the current working directory????

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 13 Nov 2007 12:40:41 -0800
Alex Lindberg wrote:
I would like to determine the current working
directory from addr_resolv.c.

I have tried various functions from filesystem.c/h
without any luck.

As an example get_persdatafile_dir() in addr_resolv.c
returns an empty string.

That's not supposed to unconditionally return the current working directory. It's supposed to return "the (default) directory in which personal data is stored".

On UN*X, that's the current directory; it returns an empty string, as, in the places where that routine is *currently* used, that's probably sufficient. On Windows, it returns the "My Documents" folder for the user, unless it's running as a U3 portable application, in which case it returns the appropriate directory on the U3 thumb drive.

What are you trying to do here?