From 9b171b76e06d12a9ef0e3078382ec4fda3d5e81c Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 20 Aug 2020 19:23:12 +0300 Subject: [PATCH] os: call os.real_path/1 before returning in os.find_abs_path_of_executable/1 --- vlib/os/os.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/os/os.v b/vlib/os/os.v index 27e4999c6c..48fadc32e7 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -967,7 +967,7 @@ fn executable_fallback() string { // the absolute path of the executable if found pub fn find_abs_path_of_executable(exepath string) ?string { if os.is_abs_path(exepath) { - return exepath + return os.real_path(exepath) } mut res := '' env_path_delimiter := if os.user_os() == 'windows' { ';' } else { ':' } @@ -980,7 +980,7 @@ pub fn find_abs_path_of_executable(exepath string) ?string { } } if res.len>0 { - return res + return os.real_path(res) } return error('failed to find executable') }