To: vim-dev@vim.org Subject: Patch 7.2.326 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.2.326 Problem: Win32: $HOME doesn't work when %HOMEPATH% is not defined. Solution: Use "\" for %HOMEPATH% when it is not defined. Files: src/misc1.c *** ../vim-7.2.325/src/misc1.c 2009-12-02 17:47:46.000000000 +0100 --- src/misc1.c 2010-01-05 19:53:23.000000000 +0100 *************** *** 3470,3476 **** homedrive = mch_getenv((char_u *)"HOMEDRIVE"); homepath = mch_getenv((char_u *)"HOMEPATH"); ! if (homedrive != NULL && homepath != NULL && STRLEN(homedrive) + STRLEN(homepath) < MAXPATHL) { sprintf((char *)NameBuff, "%s%s", homedrive, homepath); --- 3470,3478 ---- homedrive = mch_getenv((char_u *)"HOMEDRIVE"); homepath = mch_getenv((char_u *)"HOMEPATH"); ! if (homepath == NULL || *homepath == NUL) ! homepath = "\\"; ! if (homedrive != NULL && STRLEN(homedrive) + STRLEN(homepath) < MAXPATHL) { sprintf((char *)NameBuff, "%s%s", homedrive, homepath); *** ../vim-7.2.325/src/version.c 2009-12-31 14:52:48.000000000 +0100 --- src/version.c 2010-01-06 17:39:23.000000000 +0100 *************** *** 683,684 **** --- 683,686 ---- { /* Add new patch number below this line */ + /**/ + 326, /**/ -- From "know your smileys": :q vi user saying, "How do I get out of this damn emacs editor?" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///