From 54fea00b9d286e4d3c5cef4190427944356103cd Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Wed, 29 May 2024 13:07:26 -0400 Subject: [PATCH] Fix error when shearing without a device ID (offline mode) --- src/sync/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync/common.go b/src/sync/common.go index 82661e0..39e6644 100644 --- a/src/sync/common.go +++ b/src/sync/common.go @@ -101,7 +101,7 @@ func ShearLocal(targetLocationIncomplete, clientDeviceID string) string { os.Exit(1) } - if !onServer { // return the device ID if running on the client + if !onServer && len(deviceIDList) > 0 { // return the device ID if running on the client and a device ID exists (online mode) return deviceIDList[0].Name() } return ""