Re: Folders become inaccessible after browsing remote locations like ftp, smb



Hi,

I've uploaded the patch for this bug in bugzilla.
http://bugzilla.gnome.org/show_bug.cgi?id=170761.
Kindly review.

Thanks and Regards
Dinoop

dinoop thomas wrote:

Hi,

I come across a bug in nautilus bookmarks code while browsing through remote locations like ftp, smb etc. Once the problem is seen, user will not be able to rename or open folders. Please refer to bug: http://bugzilla.gnome.org/show_bug.cgi?id=170761 for more details.

After evaluating, its found that the problem occurs due to the following code in nautilus-bookmark.c:nautilus_bookmark_connect_file()

if (!nautilus_bookmark_uri_known_not_to_exist (bookmark)) {
 bookmark->details->file = nautilus_file_get (bookmark->details->uri);
 g_assert (!nautilus_file_is_gone (bookmark->details->file));
 g_signal_connect_object (bookmark->details->file, "changed",
G_CALLBACK (bookmark_file_changed_callback), bookmark, 0);
}

For a local file, before updating the bookmark->details->file field, we check whether the file actually exists by calling nautilus_bookmark_uri_known_not_to_exist() function . If the file is deleted from trash, its bookmark will be disconnected.

But for a non local file , the function always returns false. So even if file is removed permanently, the above code gets executed and file gets recreated for a non existing URI and bookmark file field will be updated. Since the file itself does not exist, nautilus will try to get its information, causing an infinite loop to occur.

I am not sure how to find that a non local file is really gone and disconnect its bookmark.

Tried replacing nautilus_file_get in the above code with nautilus_file_get_existing, which will make sure that file is not recreated for a non existing URI. It solved the bug. Is it right way to fix it ? If so, I can upload a patch to bugzilla.

Kindly give your valuable advice.

Thanks,
Dinoop








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