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