Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Unix/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ https://github.com/Inventitech
https://github.com/zhangzqs
https://github.com/drkameleon
https://github.com/jackos
https://github.com/Aerek-Yasa
https://github.com/Aerek-Yasa
https://github.com/EDM115
13 changes: 13 additions & 0 deletions Unix/cloc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,19 @@ if ($ON_WINDOWS and $ENV{'SHELL'}) {
}
}

use Cwd "abs_path";
use File::Spec;
# Fix for issues when runing cloc through a symlink on Windows
# e.g. : it have been installed with Winget
# See https://github.com/AlDanial/cloc/issues/849
if ($ON_WINDOWS) {
my $exec_path = abs_path($0);
if (-l $0) {
$exec_path = abs_path(readlink($0));
}
$0 = $exec_path;
}

my $HAVE_Win32_Long_Path = 0;
# Win32::LongPath is an optional dependency that when available on
# Windows will be used to support reading files past the 255 char
Expand Down
13 changes: 13 additions & 0 deletions cloc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,19 @@ if ($ON_WINDOWS and $ENV{'SHELL'}) {
}
}

use Cwd "abs_path";
use File::Spec;
# Fix for issues when runing cloc through a symlink on Windows
# e.g. : it have been installed with Winget
# See https://github.com/AlDanial/cloc/issues/849
if ($ON_WINDOWS) {
my $exec_path = abs_path($0);
if (-l $0) {
$exec_path = abs_path(readlink($0));
}
$0 = $exec_path;
}

my $HAVE_Win32_Long_Path = 0;
# Win32::LongPath is an optional dependency that when available on
# Windows will be used to support reading files past the 255 char
Expand Down