canonical
or absolute
is the way to do it. Do you use the returned path? The given path is taken as a constant reference so it is not modified in place. From the boost manuals:
path canonical(const path& p, const path& base = current_path());
path canonical(const path& p, system::error_code& ec);
path canonical(const path& p, const path& base, system::error_code& ec);
Overview: Converts p, which must exist, to an absolute path that has no symbolic link, dot, or dot-dot elements.