Skip to content

Commit

Permalink
Handle existing config directory in vncpasswd
Browse files Browse the repository at this point in the history
This fixes commit a79c33d.

(cherry picked from commit 445e023)
  • Loading branch information
CendioOssman authored and LMattsson committed Oct 18, 2024
1 parent 0d2e46e commit 4c573f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions unix/vncpasswd/vncpasswd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ int main(int argc, char** argv)
exit(1);
}
if (os::mkdir_p(configDir, 0777) == -1) {
fprintf(stderr, "Could not create VNC config directory: %s\n", strerror(errno));
exit(1);
if (errno != EEXIST) {
fprintf(stderr, "Could not create VNC config directory: %s\n", strerror(errno));
exit(1);
}
}
snprintf(fname, sizeof(fname), "%s/passwd", configDir);
}
Expand Down

0 comments on commit 4c573f8

Please sign in to comment.