Skip to content

Commit

Permalink
Slight simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Apr 9, 2024
1 parent 96ceb4e commit 2469d75
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions common/os/os.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ static const char* getvncdir(bool userDir, const char *xdg_env, const char *xdg_
snprintf(dir, sizeof(dir), "%s/%s/tigervnc", homedir, xdg_def);

snprintf(legacy, sizeof(legacy), "%s/.vnc", homedir);
return (stat(dir, &st) != 0 && stat(legacy, &st) == 0) ? legacy : dir;
#else
(void) xdg_def;
(void) xdg_env;
Expand Down Expand Up @@ -104,9 +103,8 @@ static const char* getvncdir(bool userDir, const char *xdg_env, const char *xdg_

strcat(dir, "\\TigerVNC");
strcat(legacy, "\\vnc");

return (stat(dir, &st) != 0 && stat(legacy, &st) == 0) ? legacy : dir;
#endif
return (stat(dir, &st) != 0 && stat(legacy, &st) == 0) ? legacy : dir;
}

const char* os::getuserhomedir()
Expand Down

0 comments on commit 2469d75

Please sign in to comment.