From 266accc4731bb5d186b7a5c4404ef5fbd403dd56 Mon Sep 17 00:00:00 2001 From: Brenton Bostick Date: Fri, 3 Nov 2023 09:56:40 -0400 Subject: [PATCH] Remove extra '/' On macOS, dump gives this output: % sudo zerotier-cli dump Writing dump to: /Users/brenton/Desktop//zerotier_dump.txt No reason for extra '/' in path --- one.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/one.cpp b/one.cpp index 4c7dd9cc1..977da1f20 100644 --- a/one.cpp +++ b/one.cpp @@ -1210,7 +1210,7 @@ static int cli(int argc,char **argv) FSRefMakePath(&fsref, path, sizeof(path)) == noErr) { } else if (getenv("SUDO_USER")) { - sprintf((char*)path, "/Users/%s/Desktop/", getenv("SUDO_USER")); + sprintf((char*)path, "/Users/%s/Desktop", getenv("SUDO_USER")); } else { fprintf(stdout, "%s", dump.str().c_str()); return 0;