updated for version 7.0168
diff --git a/src/misc1.c b/src/misc1.c
index bef297c..cd8acce 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -4443,6 +4443,29 @@
}
#endif
+/*
+ * Return TRUE if the directory of "fname" exists, FALSE otherwise.
+ * Also returns TRUE if there is no directory name.
+ * "fname" must be writable!.
+ */
+ int
+dir_of_file_exists(fname)
+ char_u *fname;
+{
+ char_u *p;
+ int c;
+ int retval;
+
+ p = gettail_sep(fname);
+ if (p == fname)
+ return TRUE;
+ c = *p;
+ *p = NUL;
+ retval = mch_isdir(fname);
+ *p = c;
+ return retval;
+}
+
#if (defined(CASE_INSENSITIVE_FILENAME) && defined(BACKSLASH_IN_FILENAME)) \
|| defined(PROTO)
/*