boost::filesystem::current_path().string()

(11:23:04 PM) epure_: hi (11:23:13 PM) epure_: i'm using "boost::filesystem::current_path().string()" from a dll (11:23:27 PM) epure_: windows 7, it prints the paths to the executable which uses the DLL (11:23:38 PM) epure_: window xp , it prints the path to my desktop (11:23:54 PM) epure_: how do I make it so that it behaves like windows 7 ? Thanks, epure

On Wed, Apr 20, 2011 at 13:35, buster buster
i'm using "boost::filesystem::current_path().string()" from a dll
To quote the reference documentation: "The current path as returned by many operating systems is a dangerous global variable. It may be changed unexpectedly by a third-party or system library functions, or by another thread." It also depends on how you open the executable, and all kinds of other things. Be explicit about your paths, and have the program using your DLL tell you what path it wants you to use. ~ Scott
participants (2)
-
buster buster
-
Scott McMurray