Christian Brabandt (Vim Github Repository) wrote:

Okay, so how about the following patch. It checks, whether the filename starts with something that looks like a protocol specifier like |http:/| or in this case |zipfile:/| and in that case does not prepend the current directory to it (assuming a plugin will take care of reading this):

diff --git a/src/os_unix.c b/src/os_unix.c
index d192b6bcf..09e1f7d2f 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2648,11 +2648,17 @@  mch_FullName(
                     vim_strncpy(buf, fname, p - fname);
                     if (mch_chdir((char *)buf))
                     {
+ char_u *s = vim_strchr(fname, ':');
+
                         // Path does not exist (yet).  For a full path fail,
                         // will use the path as-is.  For a relative path use
                         // the current directory and append the file name.
                         if (mch_isFullName(fname))
                             retval = FAIL;
+ // the filename begins with a protocol identifier like http://
+ // do not prepend the path to it, a plugin may handle it
+ else if ( s != NULL && *++s == '/')
+ retval = FAIL;
                         else
                             p = NULL;
                     }
Looks like this patch works for me!

Thank you, Christian,

Chip Campbell

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/31e4fe3e-f8e4-3860-161b-0fa362fb64b2%40drchip.org.

Raspunde prin e-mail lui