X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Futils.cpp;h=abe0d2563125d9288dbdb2cdc5c6ee6b291e856f;hb=9c48f72f02e3112f4193cc8b3f12b135aa483de1;hp=a0c2486f17402593b2e48199fc9d689923098809;hpb=1834fcf2465c77c387bc92df5529d8631abaffa5;p=libs%2Fcore.git diff --git a/source/utils.cpp b/source/utils.cpp index a0c2486..abe0d25 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -30,6 +30,12 @@ string basename(const Path &p) Path dirname(const Path &p) { + if(p.size()==1) + { + if(p.is_absolute()) + return p; + return "."; + } return p.subpath(0, p.size()-1); } @@ -82,6 +88,7 @@ Path fix_case(const Path &path) Path readlink(const Path &link) { #ifdef WIN32 + (void)link; throw Exception("No symbolic links on win32"); #else char buf[4096];