[Nautilus-list] nautilus-1.0.4-fs.patch



on 10/1/01 8:55 AM, Frederic Crozat at fcrozat mandrakesoft com wrote:

> Patch3: nautilus-1.0.4-fs.patch
> This patch adds support for JFS (this part of the patch was based on the
> old version of nautilus-volume-monitor.c) and fixes mount error handling
> (in short, we use LC_ALL=C locale before running mount to be able to
> parse mount error message without any translation..

This patch looks good. A few things need to be fixed before it can be
committed:

> -    if (info != NULL) {
> +    if (info != NULL) {
> +        gchar * old_locale;

Declarations go at the top of the function in Nautilus code. At this point,
we might want to put this into a separate function.

>          open_error_pipe ();
> +        
> +        old_locale = g_getenv("LC_ALL");
> +        putenv("LC_ALL=C");

This should use eel_setenv instead of putenv.

>          file = popen (info->command, "r");
>          close_error_pipe (info->should_mount, info->mount_point);
>          pclose (file);
> -        
> +        if (old_locale) {

In Nautilus we use old_locale != NULL for checks like this.

> +            putenv(g_strdup_printf("LC_ALL=%s",old_locale));

This should use eel_setenv instead of putenv.

> +        }
> +        else {
> +            unsetenv("LC_ALL");

This should use eel_unsetenv instead of unsetenv.

> +        }

With those fixes, I think it's fine to commit the change.

    -- Darin





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