|
|
3ef2ca |
To: vim_dev@googlegroups.com
|
|
|
3ef2ca |
Subject: Patch 7.4.136
|
|
|
3ef2ca |
Fcc: outbox
|
|
|
3ef2ca |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
3ef2ca |
Mime-Version: 1.0
|
|
|
3ef2ca |
Content-Type: text/plain; charset=UTF-8
|
|
|
3ef2ca |
Content-Transfer-Encoding: 8bit
|
|
|
3ef2ca |
------------
|
|
|
3ef2ca |
|
|
|
3ef2ca |
Patch 7.4.136 (after 7.4.096)
|
|
|
3ef2ca |
Problem: MS-Windows: When saving a file with a UNC path the file becomes
|
|
|
3ef2ca |
read-only.
|
|
|
3ef2ca |
Solution: Don't mix up Win32 attributes and Unix attributes. (Ken Takata)
|
|
|
3ef2ca |
Files: src/os_mswin.c, src/os_win32.c
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.135/src/os_mswin.c 2013-09-29 19:05:17.000000000 +0200
|
|
|
3ef2ca |
--- src/os_mswin.c 2014-01-10 13:03:19.000000000 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 617,624 ****
|
|
|
3ef2ca |
--- 617,638 ----
|
|
|
3ef2ca |
p = buf + strlen(buf);
|
|
|
3ef2ca |
if (p > buf)
|
|
|
3ef2ca |
mb_ptr_back(buf, p);
|
|
|
3ef2ca |
+
|
|
|
3ef2ca |
+ /* Remove trailing '\\' except root path. */
|
|
|
3ef2ca |
if (p > buf && (*p == '\\' || *p == '/') && p[-1] != ':')
|
|
|
3ef2ca |
*p = NUL;
|
|
|
3ef2ca |
+
|
|
|
3ef2ca |
+ if ((buf[0] == '\\' && buf[1] == '\\') || (buf[0] == '/' && buf[1] == '/'))
|
|
|
3ef2ca |
+ {
|
|
|
3ef2ca |
+ /* UNC root path must be followed by '\\'. */
|
|
|
3ef2ca |
+ p = vim_strpbrk(buf + 2, "\\/");
|
|
|
3ef2ca |
+ if (p != NULL)
|
|
|
3ef2ca |
+ {
|
|
|
3ef2ca |
+ p = vim_strpbrk(p + 1, "\\/");
|
|
|
3ef2ca |
+ if (p == NULL)
|
|
|
3ef2ca |
+ STRCAT(buf, "\\");
|
|
|
3ef2ca |
+ }
|
|
|
3ef2ca |
+ }
|
|
|
3ef2ca |
#ifdef FEAT_MBYTE
|
|
|
3ef2ca |
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage
|
|
|
3ef2ca |
# ifdef __BORLANDC__
|
|
|
3ef2ca |
*** ../vim-7.4.135/src/os_win32.c 2014-01-05 13:29:16.000000000 +0100
|
|
|
3ef2ca |
--- src/os_win32.c 2014-01-10 12:59:32.000000000 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 2890,2898 ****
|
|
|
3ef2ca |
struct stat st;
|
|
|
3ef2ca |
int n;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
- if (name[0] == '\\' && name[1] == '\\')
|
|
|
3ef2ca |
- /* UNC path */
|
|
|
3ef2ca |
- return (long)win32_getattrs(name);
|
|
|
3ef2ca |
n = mch_stat(name, &st);
|
|
|
3ef2ca |
return n == 0 ? (long)st.st_mode : -1L;
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
--- 2890,2895 ----
|
|
|
3ef2ca |
*** ../vim-7.4.135/src/version.c 2014-01-06 15:51:46.000000000 +0100
|
|
|
3ef2ca |
--- src/version.c 2014-01-10 13:04:43.000000000 +0100
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 740,741 ****
|
|
|
3ef2ca |
--- 740,743 ----
|
|
|
3ef2ca |
{ /* Add new patch number below this line */
|
|
|
3ef2ca |
+ /**/
|
|
|
3ef2ca |
+ 136,
|
|
|
3ef2ca |
/**/
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--
|
|
|
3ef2ca |
hundred-and-one symptoms of being an internet addict:
|
|
|
3ef2ca |
128. You can access the Net -- via your portable and cellular phone.
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
3ef2ca |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
3ef2ca |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
3ef2ca |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|