X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fglocalfile.c;h=846eedbcc27e26a7d0ebf134c99ee1e5ea186392;hb=a3d86afa81ff34ce797a3928fd619ead219a37af;hp=3763a464d081fd3d15be882387a42dc82dbef500;hpb=7eb1e5fc5bc5aa6744bd516463ca2d65104c5a4e;p=platform%2Fupstream%2Fglib.git diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 3763a46..846eedb 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -13,9 +13,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. + * Public License along with this library; if not, see . * * Author: Alexander Larsson */ @@ -29,8 +27,6 @@ #include #if G_OS_UNIX #include -#endif -#ifdef HAVE_UNISTD_H #include #endif @@ -72,6 +68,8 @@ #endif #include "glib-private.h" +#include "glib-private.h" + #ifdef G_OS_WIN32 #include #include @@ -141,7 +139,7 @@ g_local_file_class_init (GLocalFileClass *klass) G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE | G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED); -#ifdef HAVE_CHOWN +#ifdef G_OS_UNIX g_file_attribute_info_list_add (list, G_FILE_ATTRIBUTE_UNIX_UID, G_FILE_ATTRIBUTE_TYPE_UINT32, @@ -2081,6 +2079,8 @@ g_local_file_trash (GFile *file, { int errsv = errno; + g_unlink (infofile); + g_free (topdir); g_free (trashname); g_free (infofile); @@ -2505,7 +2505,7 @@ g_local_file_monitor_dir (GFile *file, GError **error) { GLocalFile* local_file = G_LOCAL_FILE(file); - return _g_local_directory_monitor_new (local_file->filename, flags, is_remote (local_file->filename), error); + return _g_local_directory_monitor_new (local_file->filename, flags, NULL, is_remote (local_file->filename), TRUE, error); } static GFileMonitor* @@ -2515,7 +2515,27 @@ g_local_file_monitor_file (GFile *file, GError **error) { GLocalFile* local_file = G_LOCAL_FILE(file); - return _g_local_file_monitor_new (local_file->filename, flags, is_remote (local_file->filename), error); + return _g_local_file_monitor_new (local_file->filename, flags, NULL, is_remote (local_file->filename), TRUE, error); +} + +GLocalDirectoryMonitor * +g_local_directory_monitor_new_in_worker (const char *pathname, + GFileMonitorFlags flags, + GError **error) +{ + return (gpointer) _g_local_directory_monitor_new (pathname, flags, + GLIB_PRIVATE_CALL (g_get_worker_context) (), + is_remote (pathname), FALSE, error); +} + +GLocalFileMonitor * +g_local_file_monitor_new_in_worker (const char *pathname, + GFileMonitorFlags flags, + GError **error) +{ + return (gpointer) _g_local_file_monitor_new (pathname, flags, + GLIB_PRIVATE_CALL (g_get_worker_context) (), + is_remote (pathname), FALSE, error); } @@ -2621,7 +2641,7 @@ g_local_file_measure_size_of_file (gint parent_fd, MeasureState *state, GError **error) { - struct stat buf; + GLocalFileStat buf; if (g_cancellable_set_error_if_cancelled (state->cancellable, error)) return FALSE;