diff --git a/hgdriver/wrapper/hg_log.cpp b/hgdriver/wrapper/hg_log.cpp index b040ea2..377cca9 100644 --- a/hgdriver/wrapper/hg_log.cpp +++ b/hgdriver/wrapper/hg_log.cpp @@ -297,7 +297,7 @@ extern "C" char path[256] = { 0 }; int len = readlink(lnk, path, sizeof(path) - 1); - return path; + return len > 0 ? path : lnk; } static int enum_files(const char* dir, bool recursive, bool(*found_file)(const char* path_file, void* param), void* param) {