X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=cut-n-paste%2Frecent-files%2Fegg-recent-model.c;h=201aec006d7d17c54ce01d72276fde697e875174;hb=847c9a92060b6b1936066136d43f7cf2f06ca34e;hp=f36053bc2585e03b2317d0a4615a3daaf47ca03c;hpb=69d92c409d333e5dd9cc82537c0834b201487c60;p=evince.git diff --git a/cut-n-paste/recent-files/egg-recent-model.c b/cut-n-paste/recent-files/egg-recent-model.c index f36053bc..201aec00 100644 --- a/cut-n-paste/recent-files/egg-recent-model.c +++ b/cut-n-paste/recent-files/egg-recent-model.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/** +/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the @@ -677,12 +677,17 @@ static void egg_recent_model_monitor (EggRecentModel *model, gboolean should_monitor) { if (should_monitor && model->priv->monitor == NULL) { + char *uri; + + uri = gnome_vfs_get_uri_from_local_path (model->priv->path); gnome_vfs_monitor_add (&model->priv->monitor, - model->priv->path, - GNOME_VFS_MONITOR_FILE, - egg_recent_model_monitor_cb, - model); + uri, + GNOME_VFS_MONITOR_FILE, + egg_recent_model_monitor_cb, + model); + + g_free (uri); /* if the above fails, don't worry about it. * local notifications will still happen @@ -1286,6 +1291,7 @@ egg_recent_model_add_full (EggRecentModel * model, EggRecentItem *item) ret = TRUE; } else { g_warning ("Failed to lock: %s", strerror (errno)); + fclose (file); return FALSE; }