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.
  • Loading branch information
CendioOssman committed Aug 15, 2024
1 parent cd1bb9d commit 445e023
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 @@ -213,8 +213,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 445e023

Please sign in to comment.