$OpenBSD: patch-kinit_lnusertemp_c,v 1.3 2015/01/20 21:58:43 zhuk Exp $
Distinguish KDE4 temporary directories.
--- kinit/lnusertemp.c.orig	Fri Nov  7 01:33:50 2014
+++ kinit/lnusertemp.c	Thu Nov 13 21:19:07 2014
@@ -278,11 +278,11 @@ int main(int argc, char **argv)
 
   if (strcmp(argv[1], "tmp") == 0)
   {
-    tmp_prefix = (char *)malloc(strlen(tmp)+strlen("/kde-")+1);
+    tmp_prefix = (char *)malloc(strlen(tmp)+strlen("/kde4-")+1);
     strcpy(tmp_prefix, tmp);
-    strcat(tmp_prefix, "/kde-"); 
+    strcat(tmp_prefix, "/kde4-"); 
     
-    kde_prefix = "/tmp-"; 
+    kde_prefix = "/tmp4-"; 
   }
   else if (strcmp(argv[1], "socket") == 0)
   {
@@ -290,11 +290,11 @@ int main(int argc, char **argv)
     if (xdg_runtime_dir && xdg_runtime_dir[0])
       tmp = xdg_runtime_dir;
 
-    tmp_prefix = (char *)malloc(strlen(tmp)+strlen("/ksocket-")+1);
+    tmp_prefix = (char *)malloc(strlen(tmp)+strlen("/k4socket-")+1);
     strcpy(tmp_prefix, tmp );
-    strcat(tmp_prefix, "/ksocket-" );
+    strcat(tmp_prefix, "/k4socket-" );
 
-    kde_prefix = "/socket-"; 
+    kde_prefix = "/socket4-"; 
   }
   else if (strcmp(argv[1], "cache") == 0)
   {
@@ -302,11 +302,11 @@ int main(int argc, char **argv)
     if (!tmp || !tmp[0]) 
       tmp = "/var/tmp";
 
-    tmp_prefix = (char *)malloc(strlen(tmp)+strlen("/kdecache-")+1);
+    tmp_prefix = (char *)malloc(strlen(tmp)+strlen("/kde4cache-")+1);
     strcpy(tmp_prefix, tmp );
-    strcat(tmp_prefix, "/kdecache-" );
+    strcat(tmp_prefix, "/kde4cache-" );
 
-    kde_prefix = "/cache-"; 
+    kde_prefix = "/cache4-"; 
   }
 
   res = build_link(tmp, tmp_prefix, kde_prefix); 
