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
This commit is contained in:
Brenton Bostick 2023-11-03 09:56:40 -04:00
parent 1bd2fecbf6
commit a477688e51

View File

@ -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;