Index: functions.c
===================================================================
--- functions.c	(revision efeec7f945a0024cc21af30c2e6c2110bb5d3c6b)
+++ functions.c	(revision 06af66334acddeb96d1a51ba1193576bb2fc707d)
@@ -410,5 +410,5 @@
   old_msg = g_strdup(owl_zwrite_get_message(z));
 
-  zcrypt = g_strdup_printf("%s/zcrypt", owl_get_bindir());
+  zcrypt = g_build_filename(owl_get_bindir(), "zcrypt", NULL);
   argv[0] = "zcrypt";
   argv[1] = "-E";
Index: global.c
===================================================================
--- global.c	(revision 16cf182d1bda3c32ab0cf40b5848f9b365f22a97)
+++ global.c	(revision 06af66334acddeb96d1a51ba1193576bb2fc707d)
@@ -77,5 +77,5 @@
   g->confdir = NULL;
   g->startupfile = NULL;
-  cd = g_strdup_printf("%s/%s", g->homedir, OWL_CONFIG_DIR);
+  cd = g_build_filename(g->homedir, OWL_CONFIG_DIR, NULL);
   owl_global_set_confdir(g, cd);
   g_free(cd);
@@ -364,5 +364,5 @@
   g->confdir = g_strdup(cd);
   g_free(g->startupfile);
-  g->startupfile = g_strdup_printf("%s/startup", cd);
+  g->startupfile = g_build_filename(cd, "startup", NULL);
 }
 
Index: logging.c
===================================================================
--- logging.c	(revision 6829afcb7133217c6afdbd7634452d0fabdeaa4f)
+++ logging.c	(revision 06af66334acddeb96d1a51ba1193576bb2fc707d)
@@ -224,5 +224,5 @@
     while (cc != NULL) {
       temp = short_zuser(cc->data);
-      filename = g_strdup_printf("%s/%s", logpath, temp);
+      filename = g_build_filename(logpath, temp, NULL);
       owl_log_append(m, filename);
 
@@ -248,10 +248,10 @@
   }
 
-  filename = g_strdup_printf("%s/%s", logpath, to);
+  filename = g_build_filename(logpath, to, NULL);
   owl_log_append(m, filename);
   g_free(to);
   g_free(filename);
 
-  filename = g_strdup_printf("%s/all", logpath);
+  filename = g_build_filename(logpath, "all", NULL);
   owl_log_append(m, filename);
   g_free(logpath);
@@ -285,5 +285,5 @@
   /* expand ~ in path names */
   logpath = owl_util_makepath(owl_global_get_logpath(&g));
-  filename = g_strdup_printf("%s/%s", logpath, tobuff);
+  filename = g_build_filename(logpath, tobuff, NULL);
   msgbuf = g_string_new("");
   g_string_printf(msgbuf, "ERROR (owl): %s\n%s\n", tobuff, text);
@@ -294,5 +294,5 @@
   g_string_free(msgbuf, TRUE);
 
-  filename = g_strdup_printf("%s/all", logpath);
+  filename = g_build_filename(logpath, "all", NULL);
   g_free(logpath);
   msgbuf = g_string_new("");
@@ -393,11 +393,11 @@
   if (personal) {
     logpath = owl_util_makepath(owl_global_get_logpath(&g));
-    filename = g_strdup_printf("%s/%s", logpath, from);
-    allfilename = g_strdup_printf("%s/all", logpath);
+    filename = g_build_filename(logpath, from, NULL);
+    allfilename = g_build_filename(logpath, "all", NULL);
     owl_log_append(m, allfilename);
     g_free(allfilename);
   } else {
     logpath = owl_util_makepath(owl_global_get_classlogpath(&g));
-    filename = g_strdup_printf("%s/%s", logpath, from);
+    filename = g_build_filename(logpath, from, NULL);
   }
 
@@ -415,5 +415,5 @@
       temp = short_zuser(cc->data);
       if (strcasecmp(temp, frombuff) != 0) {
-	filename = g_strdup_printf("%s/%s", logpath, temp);
+	filename = g_build_filename(logpath, temp, NULL);
         owl_log_append(m, filename);
 	g_free(filename);
Index: message.c
===================================================================
--- message.c	(revision f9df2f0a430fa768e47ad35c87f620f1f28b7f16)
+++ message.c	(revision 06af66334acddeb96d1a51ba1193576bb2fc707d)
@@ -884,5 +884,5 @@
     char *zcrypt;
 
-    zcrypt = g_strdup_printf("%s/zcrypt", owl_get_bindir());
+    zcrypt = g_build_filename(owl_get_bindir(), "zcrypt", NULL);
 
     rv = call_filter(zcrypt, argv, owl_message_get_body(m), &out, &status);
Index: perlconfig.c
===================================================================
--- perlconfig.c	(revision ce68f235ae86ae86fa4398ae206bda1194d1fcda)
+++ perlconfig.c	(revision 06af66334acddeb96d1a51ba1193576bb2fc707d)
@@ -406,5 +406,5 @@
   /* Add the system lib path to @INC */
   inc = get_av("INC", 0);
-  path = g_strdup_printf("%s/lib", owl_get_datadir());
+  path = g_build_filename(owl_get_datadir(), "lib", NULL);
   av_unshift(inc, 1);
   av_store(inc, 0, owl_new_sv(path));
Index: util.c
===================================================================
--- util.c	(revision c0c48d14cd5317aaaaffb853fb6e22ab5ca7327f)
+++ util.c	(revision 06af66334acddeb96d1a51ba1193576bb2fc707d)
@@ -388,8 +388,5 @@
     if (!g_path_is_absolute(link_path)) {
       char *last_dir = g_path_get_dirname(last_path);
-      char *tmp = g_build_path(G_DIR_SEPARATOR_S,
-			       last_dir,
-			       link_path,
-			       NULL);
+      char *tmp = g_build_filename(last_dir, link_path, NULL);
       g_free(last_dir);
       g_free(link_path);
Index: zcrypt.c
===================================================================
--- zcrypt.c	(revision 6829afcb7133217c6afdbd7634452d0fabdeaa4f)
+++ zcrypt.c	(revision 06af66334acddeb96d1a51ba1193576bb2fc707d)
@@ -433,5 +433,5 @@
 
   /* Open~/.crypt-table */
-  filename = g_strdup_printf("%s/.crypt-table", getenv("HOME"));
+  filename = g_build_filename(home, ".crypt-table", NULL);
   fsearch = fopen(filename, "r");
   if (fsearch)
Index: zephyr.c
===================================================================
--- zephyr.c	(revision ecffae6c5b3fd57d8ca74cd2ba142098748bfe7c)
+++ zephyr.c	(revision 06af66334acddeb96d1a51ba1193576bb2fc707d)
@@ -38,5 +38,5 @@
     return g_strdup(input);
   else
-    return g_strdup_printf("%s/%s", owl_global_get_homedir(&g), name);
+    return g_build_filename(owl_global_get_homedir(&g), name, NULL);
 }
 
