File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change 66#include < config_util.h>
77
88#include < boost/filesystem.hpp>
9+ #include < boost/dll/runtime_symbol_info.hpp>
910
1011#include " render_pipeline/rppanda/stdpy/file.hpp"
1112
@@ -148,20 +149,8 @@ void MountManager::Impl::mount(void)
148149
149150std::string MountManager::Impl::find_basepath (void ) const
150151{
151- // TODO: implement linux part.
152- char path[MAX_PATH+1 ];
153- const DWORD length = ::GetModuleFileNameA (NULL , path, sizeof (path)-1 );
154-
155- if (length != 0 )
156- {
157- path[length] = L' \0 ' ;
158- }
159- else
160- {
161- throw std::system_error (std::error_code (GetLastError (), std::system_category ()), " Fail to run GetModuleFileNameW." );
162- }
163-
164- Filename pth = Filename::from_os_specific (rppanda::join (path, " .." ));
152+ Filename pth = Filename::from_os_specific (rppanda::join (
153+ Filename::from_os_specific (boost::dll::program_location ().string ()), " .." ));
165154 pth.make_absolute ();
166155
167156 return pth.get_fullpath ();
You can’t perform that action at this time.
0 commit comments