From 6b6917c144ee7261875a608be09441193ae5b4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Henrique=20Guard=C3=A3o=20Gandarez?= Date: Tue, 7 May 2024 12:26:24 -0300 Subject: [PATCH] Prioritize windows when formatting filepath --- go.mod | 2 +- pkg/heartbeat/format.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 34691106..dd4c7ac8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/wakatime/wakatime-cli -go 1.22.2 +go 1.22.3 require ( github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 diff --git a/pkg/heartbeat/format.go b/pkg/heartbeat/format.go index 8e9aa8b3..155435c9 100644 --- a/pkg/heartbeat/format.go +++ b/pkg/heartbeat/format.go @@ -34,16 +34,16 @@ func WithFormatting() HandleOption { } } -// Format accepts a heartbeat formats it's filepath and returns the formatted version. +// Format accepts a heartbeat to format its filepath and returns the formatted version. func Format(h Heartbeat) Heartbeat { - if !h.IsUnsavedEntity && (runtime.GOOS != "windows" || !windows.IsWindowsNetworkMount(h.Entity)) { - formatLinuxFilePath(&h) - } - if runtime.GOOS == "windows" { formatWindowsFilePath(&h) } + if !h.IsUnsavedEntity && !windows.IsWindowsNetworkMount(h.Entity) { + formatLinuxFilePath(&h) + } + return h }