diff src/os_msdos.c @ 6695:6529590f6c43 v7.4.672

updated for version 7.4.672 Problem: When completing a shell command, directories in the current directory are not listed. Solution: When "." is not in $PATH also look in the current directory for directories.
author Bram Moolenaar <bram@vim.org>
date Sat, 21 Mar 2015 17:32:19 +0100
parents 5ab2946f7ce5
children cf744110897d
line wrap: on
line diff
--- a/src/os_msdos.c
+++ b/src/os_msdos.c
@@ -2942,15 +2942,24 @@ mch_isdir(char_u *name)
 
 /*
  * Return 1 if "name" can be executed, 0 if not.
+ * If "use_path" is FALSE only check if "name" is executable.
  * Return -1 if unknown.
  */
     int
-mch_can_exe(name, path)
+mch_can_exe(name, path, use_path)
     char_u	*name;
     char_u	**path;
+    int		use_path;
 {
     char	*p;
+    int		mode;
 
+    if (!use_path)
+    {
+	/* TODO: proper check if file is executable. */
+	mode = vim_chmod(name);
+	return mode != -1 && (mode & FA_DIREC) == 0;
+    }
     p = searchpath(name);
     if (p == NULL || mch_isdir(p))
 	return FALSE;