aboutsummaryrefslogtreecommitdiffstats
path: root/common/os
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-01-17 19:09:26 +0100
committerPierre Ossman <ossman@cendio.se>2023-02-04 14:03:13 +0100
commitef8c84eb752e1b59ef824cedeb156b2d64fefe37 (patch)
tree4ddde34cbd29da534fb8f43fd505aca80a96a3f1 /common/os
parent803a6ae087331d2701daf608128c2e5ff1d596a7 (diff)
downloadtigervnc-ef8c84eb752e1b59ef824cedeb156b2d64fefe37.tar.gz
tigervnc-ef8c84eb752e1b59ef824cedeb156b2d64fefe37.zip
Remove trailing slash from getvnchomedir()
It should return a path to the directory itself, just like its sister function getuserhomedir().
Diffstat (limited to 'common/os')
-rw-r--r--common/os/os.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/os/os.cxx b/common/os/os.cxx
index 5492c55e..2dfabc46 100644
--- a/common/os/os.cxx
+++ b/common/os/os.cxx
@@ -66,7 +66,7 @@ static const char* gethomedir(bool userDir)
if (userDir)
return homedir;
- snprintf(dir, sizeof(dir), "%s/.vnc/", homedir);
+ snprintf(dir, sizeof(dir), "%s/.vnc", homedir);
return dir;
#else
@@ -81,10 +81,10 @@ static const char* gethomedir(bool userDir)
if (userDir)
return dir;
- if (strlen(dir) + strlen("\\vnc\\") >= sizeof(dir))
+ if (strlen(dir) + strlen("\\vnc") >= sizeof(dir))
return NULL;
- strcat(dir, "\\vnc\\");
+ strcat(dir, "\\vnc");
return dir;
#endif