Index: trunk/src/sh_files.c
===================================================================
--- trunk/src/sh_files.c	(revision 377)
+++ trunk/src/sh_files.c	(revision 378)
@@ -2598,5 +2598,5 @@
 	  if (S_TRUE == sh_unix_file_exists (testpath))
 	    {
-	      sh_files_filecheck (class, fullpath, rsrc, &dummy, 1);
+	      sh_files_filecheck (class, check_mask, fullpath, rsrc, &dummy, 1);
 	    }
 	}
@@ -2835,5 +2835,4 @@
     SL_RETURN(0, _("check_file"));
 
-  SH_MUTEX_LOCK(mutex_zfiles);
   for (pfilL = (dirstack_t *) zAVLFirst (&cursor, zfileList); pfilL;
        pfilL = (dirstack_t *) zAVLNext  (&cursor))
@@ -2848,5 +2847,4 @@
 	}
     }
-  SH_MUTEX_UNLOCK(mutex_zfiles);
 
   SL_RETURN(retval, _("check_file"));
