aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/ServerDialog.cxx
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 /vncviewer/ServerDialog.cxx
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 'vncviewer/ServerDialog.cxx')
-rw-r--r--vncviewer/ServerDialog.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vncviewer/ServerDialog.cxx b/vncviewer/ServerDialog.cxx
index a6b0e80f..db39cd59 100644
--- a/vncviewer/ServerDialog.cxx
+++ b/vncviewer/ServerDialog.cxx
@@ -320,7 +320,7 @@ void ServerDialog::loadServerHistory()
throw Exception(_("Could not obtain the home directory path"));
char filepath[PATH_MAX];
- snprintf(filepath, sizeof(filepath), "%s%s", homeDir, SERVER_HISTORY);
+ snprintf(filepath, sizeof(filepath), "%s/%s", homeDir, SERVER_HISTORY);
/* Read server history from file */
FILE* f = fopen(filepath, "r");
@@ -386,7 +386,7 @@ void ServerDialog::saveServerHistory()
throw Exception(_("Could not obtain the home directory path"));
char filepath[PATH_MAX];
- snprintf(filepath, sizeof(filepath), "%s%s", homeDir, SERVER_HISTORY);
+ snprintf(filepath, sizeof(filepath), "%s/%s", homeDir, SERVER_HISTORY);
/* Write server history to file */
FILE* f = fopen(filepath, "w+");