ex_cmds2.c.diff   [plain text]


diff -r -u -N --exclude='*.orig' vim72.orig/src/ex_cmds2.c vim72/src/ex_cmds2.c
--- vim72.orig/src/ex_cmds2.c	2008-07-13 09:18:22.000000000 -0700
+++ vim72/src/ex_cmds2.c	2008-08-19 01:06:04.000000000 -0700
@@ -2897,6 +2897,20 @@
     apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
 #endif
 
+#ifdef __APPLE__
+    if(Unix2003_compat) {
+	int remaining;
+	char * filepart = strrchr((char *)fname_exp,'/');
+	if (filepart)	filepart++;
+	else  		filepart = (char *)fname_exp;
+	remaining = STRLEN(filepart);
+	if ((remaining==5) && (STRNCMP(filepart,".exrc",5)==0)) {
+		/* only check this one file: ex_02 test 72 */
+		if (mch_am_i_owner((char *)fname_exp)!=OK) goto theend;
+	}
+    }
+#endif /* __APPLE__ */
+
 #if defined(WIN32) && defined(FEAT_CSCOPE)
     cookie.fp = fopen_noinh_readbin((char *)fname_exp);
 #else