glib r7347 - in trunk/gio: . win32
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7347 - in trunk/gio: . win32
- Date: Wed, 13 Aug 2008 06:56:31 +0000 (UTC)
Author: tml
Date: Wed Aug 13 06:56:31 2008
New Revision: 7347
URL: http://svn.gnome.org/viewvc/glib?rev=7347&view=rev
Log:
2008-08-13 Tor Lillqvist <tml novell com>
Bug 546582 - Callbacks from GFileMonitor present a GFile in the
wrong folder
* win32/gwin32directorymonitor.c
(g_win32_directory_monitor_callback): Patch by Erik van Pienbroek.
Modified:
trunk/gio/ChangeLog
trunk/gio/win32/gwin32directorymonitor.c
Modified: trunk/gio/win32/gwin32directorymonitor.c
==============================================================================
--- trunk/gio/win32/gwin32directorymonitor.c (original)
+++ trunk/gio/win32/gwin32directorymonitor.c Wed Aug 13 06:56:31 2008
@@ -96,6 +96,7 @@
PFILE_NOTIFY_INFORMATION pfile_notify_walker;
gulong file_name_len;
gchar *file_name;
+ gchar *path;
GFile *file;
GWin32DirectoryMonitorPrivate *priv = (GWin32DirectoryMonitorPrivate *) lpOverlapped;
@@ -120,9 +121,11 @@
pfile_notify_walker = (PFILE_NOTIFY_INFORMATION)(priv->file_notify_buffer + offset);
offset += pfile_notify_walker->NextEntryOffset;
file_name = g_utf16_to_utf8 (pfile_notify_walker->FileName, pfile_notify_walker->FileNameLength / sizeof(WCHAR), NULL, &file_name_len, NULL);
- file = g_file_new_for_path (file_name);
+ path = g_build_filename(G_LOCAL_DIRECTORY_MONITOR (priv->self)->dirname, file_name, NULL);
+ file = g_file_new_for_path (path);
g_file_monitor_emit_event (priv->self, file, NULL, events [pfile_notify_walker->Action]);
g_object_unref (file);
+ g_free (path);
g_free (file_name);
} while (pfile_notify_walker->NextEntryOffset);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]