gcmd-devel
[Top][All Lists]
Advanced

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

Re: [gcmd-dev] fix for smb browsing crash


From: koos
Subject: Re: [gcmd-dev] fix for smb browsing crash
Date: Tue, 10 Jul 2007 21:22:27 +0200

forgot to attach the patch...
here it is

On Tue, 10 Jul 2007 21:17:42 +0200
koos <address@hidden> wrote:

> Hello Piotr,
> 
> Here is a fix for a crash when browsing smb shares.
> To reproduce the crash one need to do the following steps.
> 1. go to smb
> 2. enter a 'workgroup'
> 3. enter a smb-server
> 4. click on the 'history arrow' that sits right above the file-list
> and select the smb-server
> 
> The cause of this crash was a malformed gnomecmdpath
> (e.g. //SERVER/(null) ). This patch makes sure that the gnomecmdpath
> is valid. 
> I hope the solution is a sensible one as the creating the directory
> listings is rather complicated in my opinion. A lot of functions are
> involved in this process.
> Furthermore I noticed there is a inconsistancy in the smb directory
> listings. When one enters a smb-server (like step 2) the parent-dir
> (the two dots) is shown. When browsing through a couple of other
> directories and returning to this point the parent-dir is not shown.
> 
> koos
> 
> 
> _______________________________________________
> gcmd-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/gcmd-devel
--- ../../trunk/src/gnome-cmd-smb-path.cc       2007-07-10
20:50:56.000000000 +0200 +++ gnome-cmd-smb-path.cc      2007-07-10
20:54:26.000000000 +0200 @@ -310,7 +310,9 @@
                 out = gnome_cmd_smb_path_new (a, b, c);
             else
             {
-                b = c ? g_strdup_printf ("/%s%s", b, c) :
g_strdup_printf ("/%s", b);
+                               if (b == NULL)
+                                       b = g_strdup_printf ("/");
+                b = c ? g_strdup_printf ("/%s%s", b, c) :
g_strdup_printf ("%s", b); g_free (c);
                 out = gnome_cmd_smb_path_new (ent->workgroup_name, a,
b); }

Attachment: gnome-cmd-smb-path.cc.patch
Description: Text Data


reply via email to

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