Re: [patch] re-read link target info upon activate: bug #119162
- From: Dave Camp <dave ximian com>
- To: mpusalkar novell com
- Cc: nautilus-list gnome org
- Subject: Re: [patch] re-read link target info upon activate: bug #119162
- Date: Sun, 16 Nov 2003 17:38:30 +0530
I committed this to HEAD and gnome-2-4, you can go ahead and close the
bug.
Thanks,
-dave
On Fri, 2003-11-14 at 13:13, mpusalkar novell com wrote:
> Hi,
> here's a patch for re-reading symbolic links upon activate. This
> allows a link that was broken earlier but is currently valid (or the
> other way around), to be detected.
> This invalidates the link's activation_uri upon an activate so that
> current info is read, rather than the cached one. This is required
> since we do not monitor symlink targets for changes.
>
> Index: fm-directory-view.c
> ===================================================================
> RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
> retrieving revision 1.588
> diff -u -r1.588 fm-directory-view.c
> --- fm-directory-view.c 6 Nov 2003 16:07:04 -0000 1.588
> +++ fm-directory-view.c 14 Nov 2003 05:33:13 -0000
> @@ -5580,6 +5580,12 @@
>
> parameters = callback_data;
>
> + if (nautilus_file_is_broken_symbolic_link (file)) {
> + eel_timed_wait_stop (cancel_activate_callback, parameters);
> + report_broken_symbolic_link (parameters->view, file);
> + return;
> + }
> +
> if (!parameters->mounted && nautilus_file_has_drive (file)) {
> drive = nautilus_file_get_drive (file);
> if (drive != NULL &&
> @@ -5661,9 +5667,10 @@
> g_return_if_fail (FM_IS_DIRECTORY_VIEW (view));
> g_return_if_fail (NAUTILUS_IS_FILE (file));
>
> - if (nautilus_file_is_broken_symbolic_link (file)) {
> - report_broken_symbolic_link (view, file);
> - return;
> + /* link target info might be stale, re-read it */
> + if (nautilus_file_is_symbolic_link (file)) {
> + nautilus_file_invalidate_attributes
> + (file, NAUTILUS_FILE_ATTRIBUTE_ACTIVATION_URI);
> }
>
> nautilus_file_ref (file);
>
>
> manu
> Novell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]