Index: trunk/src/sh_unix.c
===================================================================
--- trunk/src/sh_unix.c	(revision 220)
+++ trunk/src/sh_unix.c	(revision 221)
@@ -4272,8 +4272,8 @@
   SL_ENTER(_("sh_unix_file_exists"));
 
-  if (-1 == retry_stat(FIL__, __LINE__, path, &buf))
-    SL_RETURN( S_FALSE, _("sh_unix_file_exists"));
+  if (0 == retry_lstat(FIL__, __LINE__, path, &buf))
+    SL_RETURN( S_TRUE,   _("sh_unix_file_exists"));
   else 
-    SL_RETURN( S_TRUE,  _("sh_unix_file_exists"));
+    SL_RETURN( S_FALSE,  _("sh_unix_file_exists"));
 }
 
Index: trunk/src/trustfile.c
===================================================================
--- trunk/src/trustfile.c	(revision 220)
+++ trunk/src/trustfile.c	(revision 221)
@@ -366,4 +366,5 @@
 #else
       strncat(rbuf, "/",   rsz-strlen(rbuf)-1);
+      rbuf[rsz-1] = '\0';
       strncat(rbuf, fname, rsz-strlen(rbuf)-1);
       rbuf[rsz-1] = '\0';
