bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUser.m: Bug on Windows handling spaces in environement variable va


From: Adam Fedor
Subject: Re: NSUser.m: Bug on Windows handling spaces in environement variable values?
Date: 18 Feb 2004 09:47:40 -0700

On Mon, 2004-02-02 at 06:14, Roland Schwingel wrote:
> Hi...
> 
> Maybe there is a bug in NSUser.m.
> In CVS revision 1.75 there was a changed added to not permit spaces in 
> $USERPROFILE.
> Why was it added? This really leads to a problem in countries like 
> germany where this will defenitly
> will contain spaces (default starts with C:\Dokumente und 
> Einstellungen). We disabled this test
> a few weeks ago here and till now we found no problems with it.
> 
> IMHO this test can (and should) be removed... This is done by applying 
> the attached patch.
> 
> Thanks,
> 
> Roland
> 
> 
> 
> 
> ______________________________________________________________________
> 
> --- NSUser.m.orig     2004-01-21 13:49:11.000000000 +0100
> +++ NSUser.m  2004-01-21 13:49:48.000000000 +0100
> @@ -260,7 +260,7 @@
>            for the user on more modern versions of windoze. */
>         s = GSStringFromWin32EnvironmentVariable("USERPROFILE");
>       }
> -      if (s != nil)
> +      /*if (s != nil)
>       {
>         const char    *str = [s cString];
>  
> @@ -273,7 +273,7 @@
>               }
>             str++;
>           }
> -     }
> +     }*/
>        [gnustep_global_lock unlock];
>      }
>    if ([s length] == 0 && [loginName length] != 1)

Any comments on this patch?

Incidently, make/user_home.c seems to have a bug:

diff -u -r1.13 user_home.c
--- user_home.c 30 Nov 2003 10:18:46 -0000      1.13
+++ user_home.c 18 Feb 2004 16:43:11 -0000
@@ -204,9 +204,9 @@
 
       for (i = 0; i < strlen(home); i++)
        {
-         if (isspace((int)home[0]))
+         if (isspace((int)home[i]))
            {
-             home[0] = '\0';   /* Spaces not permitted! */
+             home[i] = '\0';   /* Spaces not permitted! */
              break;
            }

Anyway, perhaps I've forgotten why, but this seems to be a make problem,
so this is really a problem for the person who builds the software, not
necessarily the people who use it.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]