X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Futils.cpp;h=d9522a3c6551d264ccf9896ef780b340220a99ef;hp=18784b3a423bb8b5d165c79ef95d72db0d594877;hb=59db379f143f9accda21b831e0243d02f27c1c70;hpb=3004842aa3281f26137c7332089068da7edb34af diff --git a/source/utils.cpp b/source/utils.cpp index 18784b3..d9522a3 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -244,4 +244,10 @@ Path get_home_dir() #endif } +void chdir(const Path &path) +{ + if(::chdir(path.str().c_str())==-1) + throw SystemError("chdir failed", errno); +} + } // namespace Msp